Backends¶
Return to API Reference.
- class userena.backends.UserenaAuthenticationBackend¶
Custom backend because the user must be able to supply a
email
orusername
to the login form.- authenticate(request, identification, password=None, check_password=True)¶
Authenticates a user through the combination email/username with password.
- Parameters
request – The authenticate() method of authentication backends requires request as the first positional argument from Django 2.1.
identification – A string containing the username or e-mail of the user that is trying to authenticate.
check_password – Boolean that defines if the password should be checked for this user. Always keep this
True
. This is only used by userena at activation when a user opens a page with a secret hash.
- Password
Optional string containing the password for the user.
- Returns
The signed in
User
.