Hi everyone

My project uses two authentications ways for different users. Administrator 
users authenticate themselves with username and password (ModelBackend). 
Customers authenticate themselves with phonenumber and token (custom 
authentication backend).
My custom backend authentication backend never gets the credentials. It 
only works if I use username and password.
class CustomerBackend:
  def authenticate(self, request, phonenumber=None, token=None, **kwargs):
    print(phone_number)
    print(token)
    print(kwargs)
    return None

It shows:
None
None
{'phonenumber': '+17786432446', 'token': 'abc'}


-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/e83d5a88-1086-4827-89fd-a9ddb8842b4f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to