mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-13 22:32: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):
|
||||
|
||||
supports_anonymous_user = False
|
||||
supports_object_permissions = False
|
||||
supports_inactive_user = False
|
||||
|
||||
def authenticate(self, username=None, password=None):
|
||||
try:
|
||||
user = User.objects.get(username=username)
|
||||
|
||||
Reference in New Issue
Block a user