wsgidav.dc.nt_dc.NTDomainController.digest_auth_user

NTDomainController.digest_auth_user(realm, user_name, environ)

Check access permissions for realm/user_name.

Called by http_authenticator for basic authentication requests.

Compute the HTTP digest hash A1 part.

Any domain controller that returns true for supports_http_digest_auth() MUST implement this method.

Optionally set environment variables:

environ[“wsgidav.auth.roles”] = (<role>, …) environ[“wsgidav.auth.permissions”] = (<perm>, …)

Note that in order to calculate A1, we need either

  • Access the plain text password of the user. In this case the method self._compute_http_digest_a1() can be used for convenience. Or

  • Return a stored hash value that is associated with the user name (for example from Apache’s htdigest files).

Parameters:
Returns:

MD5(“{usern_name}:{realm}:{password}”) or false if user is unknown or rejected

Return type:

str