mg_check_digest_access_authentication( conn, realm, filename );
|A pointer to the connection to be used to send data|
|The requested authentication realm or NULL|
|The path to the passwords file|
|An integer indicating success or failure|
This function can be used to check if a request header contains HTTP digest authentication information, matching user and password encoded within the password file. If the authentication realm (also called authentication domain) is NULL, the parameter
authentication_domain as specified in the server configuration (
mg_start()) is used.
A positive return value means, the user name, realm and a correct password hash have been found in the passwords file. A return of 0 means, reading the password file succeeded, but there was no matching user, realm and password. The function returns a negative number on errors.