pub async fn authenticate(
auth: &dyn AuthBackend,
creds: &Credentials,
) -> Result<Principal, AuthError>Expand description
Authenticate credentials against the backend and produce a Principal.
Bearer tokens are dispatched to AuthBackend::verify_bearer_token.
Backends that do not support OAuth2/Bearer (file, SQL, LDAP, …) return the
default implementation which rejects every token, preserving the previous
unconditional-reject behaviour for those backends. The OAuth2 backend
overrides the method with real JWT introspection.