Function rustream::squire::authenticator::verify_token

source ·
pub fn verify_token(
    request: &HttpRequest,
    config: &Config,
    fernet: &Fernet,
    session: &Session,
) -> AuthToken
Expand description

Verifies a session token extracted from an HTTP request against stored session mappings and configuration.

§Arguments

  • request - A reference to the Actix web HttpRequest object.
  • config - Configuration data for the application.
  • fernet - Fernet object to encrypt the auth payload that will be set as session_token cookie.
  • session - Session struct that holds the session_mapping and session_tracker to handle sessions.

§Returns

Returns an instance of the AuthToken struct indicating the result of the token verification.