Skip to main content

authenticate

Function authenticate 

Source
pub fn authenticate(
    keys: &Tenants,
    authorization: Option<&str>,
) -> Result<Caller, AuthError>
Expand description

The caller a request’s Authorization header names. The key is looked up on every call, with no cache, so a revoked key fails on its next request.

A failed check is counted in the audit (Tenants::count_auth_failure), except when the key table could not be read.