Skip to content

Commit c9c8ae0

Browse files
committed
authentication backends support
1 parent e05afc1 commit c9c8ae0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

secureauth/backend.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# -*- coding: utf-8 -*-
22

3-
from django.contrib.auth.backends import ModelBackend
43
from django.db.models import get_model
4+
from django.contrib.auth import authenticate
55

66

7-
class AuthBackend(ModelBackend):
7+
class AuthBackend(object):
88
def auth(self, credentials, method='', code=''):
9-
user = super(AuthBackend, self).authenticate(**credentials)
9+
user = authenticate(**credentials)
1010
auth_backend = get_model('secureauth', 'UserAuth%s' % method)
1111

1212
if auth_backend is not None and user is not None:

0 commit comments

Comments
 (0)