mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-14 14:52:15 +00:00
Update the authentication backend with upcoming features
This commit is contained in:
@@ -5,6 +5,10 @@ from hashlib import sha1
|
|||||||
|
|
||||||
class SimpleHashModelBackend(ModelBackend):
|
class SimpleHashModelBackend(ModelBackend):
|
||||||
|
|
||||||
|
supports_anonymous_user = False
|
||||||
|
supports_object_permissions = False
|
||||||
|
supports_inactive_user = False
|
||||||
|
|
||||||
def authenticate(self, username=None, password=None):
|
def authenticate(self, username=None, password=None):
|
||||||
try:
|
try:
|
||||||
user = User.objects.get(username=username)
|
user = User.objects.get(username=username)
|
||||||
|
|||||||
Reference in New Issue
Block a user