Skip to main content

check_password

Authenticate against Django's auth database.

mod_wsgi docs specify None, True, False as return value depending on whether the user exists and authenticates.

Return None if the user does not exist, return False if the user exists but password is not correct, and return True otherwise.

def check_password(
environ: dict,
username: string,
password: string
) - > boolean | null

Authenticate against Django's auth database. mod_wsgi docs specify None, True, False as return value depending on whether the user exists and authenticates. Return None if the user does not exist, return False if the user exists but password is not correct, and return True otherwise.

Parameters

NameTypeDescription
environdictThe WSGI environment dictionary containing request-specific variables
usernamestringThe unique identifier for the user account being authenticated
passwordstringThe plain-text password provided by the user to be verified against the hashed database record

Returns

TypeDescription
`booleannull`