Function iqps_backend::routing::middleware::verify_jwt_middleware

source ยท
pub async fn verify_jwt_middleware(
    __arg0: State<RouterState>,
    headers: HeaderMap,
    request: Request,
    next: Next,
) -> Result<Response, AppError>
Expand description

Verifies the JWT and authenticates a user. If the JWT is invalid, the user is sent an unauthorized status code. If the JWT is valid, the authentication is added to the state.