Skip to content

Commit

Permalink
Merge pull request #183 from johngian/fix-176
Browse files Browse the repository at this point in the history
Inherit Django's ModelBackend as base auth backend.
  • Loading branch information
johngian committed Oct 9, 2017
2 parents e30069b + 7c06176 commit 15eeab9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mozilla_django_oidc/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

from django.utils.encoding import smart_bytes, smart_text
from django.contrib.auth import get_user_model
from django.contrib.auth.backends import ModelBackend
from django.core.exceptions import SuspiciousOperation, ImproperlyConfigured
from django.core.urlresolvers import reverse

Expand Down Expand Up @@ -36,7 +37,7 @@ def default_username_algo(email):
return smart_text(username)


class OIDCAuthenticationBackend(object):
class OIDCAuthenticationBackend(ModelBackend):
"""Override Django's authentication."""

def __init__(self, *args, **kwargs):
Expand Down

0 comments on commit 15eeab9

Please sign in to comment.