Function rustream::squire::authenticator::verify_token
source · pub fn verify_token(
request: &HttpRequest,
config: &Config,
fernet: &Fernet,
session: &Session
) -> AuthTokenExpand description
Verifies a session token extracted from an HTTP request against stored session mappings and configuration.
§Arguments
request- A reference to the Actix webHttpRequestobject.config- Configuration data for the application.fernet- Fernet object to encrypt the auth payload that will be set assession_tokencookie.session- Session struct that holds thesession_mappingandsession_trackerto handle sessions.
§Returns
Returns an instance of the AuthToken struct indicating the result of the token verification.