pub async fn authenticate<C: Locked + 'static, B>(
    request: Request<B>,
    next: Next<B>
) -> Result<Response, ResponseError>
Expand description

Creates a Session and additionally Auth if a Bearer token was provided.

Check Authorization header for Bearer scheme with Adapter::session_from_token. If the Adapter fails to create an AdapterSession, ResponseError::BadRequest will be returned.