Skip to content
Snippets Groups Projects
Commit 53609358 authored by Duncan Mortimer's avatar Duncan Mortimer
Browse files

Support for Django 1.6+

UNUSUABLE_PASSWORD has been replaced with UNUSABLE_PASSWORD_PREFIX and
UNUSABLE_PASSWORD_SUFFIX, however, neither of these needs to be used as
by not passing a password to the user create method you get an unusable
password by default.
parent fa04bd70
No related branches found
No related tags found
No related merge requests found
python-django-webauth (0.3.4) unstable; urgency=low
* Fixed backends to support Django 1.6+ - UNUSABLE_PASSWORD is no longer available, not passing a password on user create is the equivalent of setting an unusable password
-- Duncan Mortimer <duncan.mortimer@ndcn.ox.ac.uk> Thu, 26 Feb 2014 13:00:00 +0000
python-django-webauth (0.3.3) unstable; urgency=low
* Changes to support Django 1.4/FMRIB requirements
-- Dave Flitney <dave.flitney@ndcn.ox.ac.uk> Fri, 06 Dec 2013 20:32:00 +0000
python-django-webauth (0.3.2) unstable; urgency=low python-django-webauth (0.3.2) unstable; urgency=low
* Templates now being distrubuted by setup.py * Templates now being distrubuted by setup.py
......
...@@ -2,7 +2,7 @@ import logging ...@@ -2,7 +2,7 @@ import logging
import requests import requests
from django.conf import settings from django.conf import settings
from django.contrib.auth.models import User, Group, UNUSABLE_PASSWORD from django.contrib.auth.models import User, Group
from requests.auth import HTTPKerberosAuth from requests.auth import HTTPKerberosAuth
...@@ -15,7 +15,7 @@ class WebauthCUDBackend(object): ...@@ -15,7 +15,7 @@ class WebauthCUDBackend(object):
"https://ws.cud.ox.ac.uk/cudws/rest/search") "https://ws.cud.ox.ac.uk/cudws/rest/search")
def authenticate(self, username): def authenticate(self, username):
user, created = User.objects.get_or_create(username=username, defaults={'password': UNUSABLE_PASSWORD}) user, created = User.objects.get_or_create(username=username)
if created: if created:
logger.info("Created user: (%s - id:%s)" % (username, user.id)) logger.info("Created user: (%s - id:%s)" % (username, user.id))
else: else:
......
...@@ -4,7 +4,7 @@ import logging ...@@ -4,7 +4,7 @@ import logging
import re import re
from django.conf import settings from django.conf import settings
from django.contrib.auth.models import User, Group, UNUSABLE_PASSWORD from django.contrib.auth.models import User, Group
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
...@@ -15,7 +15,7 @@ class WebauthLDAPBackend(object): ...@@ -15,7 +15,7 @@ class WebauthLDAPBackend(object):
'ldap://ldap.oak.ox.ac.uk:389') 'ldap://ldap.oak.ox.ac.uk:389')
def authenticate(self, username): def authenticate(self, username):
user, _ = User.objects.get_or_create(username=username, defaults={'password': UNUSABLE_PASSWORD}) user, _ = User.objects.get_or_create(username=username)
auth = ldap.sasl.gssapi('') auth = ldap.sasl.gssapi('')
oakldap = ldap.initialize(self.ldap_endpoint) oakldap = ldap.initialize(self.ldap_endpoint)
oakldap.start_tls_s() oakldap.start_tls_s()
......
...@@ -15,7 +15,7 @@ setup( ...@@ -15,7 +15,7 @@ setup(
description="WebAuth/LDAP integration for Django", description="WebAuth/LDAP integration for Django",
author='IT Services, University of Oxford', author='IT Services, University of Oxford',
author_email='infodev@it.ox.ac.uk', author_email='infodev@it.ox.ac.uk',
version='0.3.3', version='0.3.4',
license='BSD', license='BSD',
url='https://github.com/ox-it/django-webauth', url='https://github.com/ox-it/django-webauth',
long_description=open('README.rst').read(), long_description=open('README.rst').read(),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment