You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: lib.rs
    path of file: ./repos/graphql-engine/v3/hasura-authn-core/src
    
    the code of the file until where you have to start completion: use axum::middleware::Next;
use axum::response::IntoResponse;
use axum::Extension;
use axum::{http::Request, http::StatusCode};
use lang_graphql::http::Response;
use schemars::JsonSchema;
use std::{
    borrow::Cow,
    collections::{HashMap, HashSet},
    str::FromStr,
};

/// The architecture is as follows:
/// 1. Every authn mechanism returns an 'Identity'.
///    An 'Identity' lists the allowed roles and a default role
///
/// 2. The identity is then resolved to a 'session'
///    The client could pick a specific role from the roles a
    
    fn into_response(self) -> axum::response::Response {
        match self {
            SessionError::Unauthorized(role) => Response::error_message_with_status(
                StatusCode::UNAUTHORIZED,
                format!("cannot be authorized as role: {}", role),
            )
            .into_response(),
            SessionError::InternalRoleNotFound(role) => Response::error_message_with_status(
                StatusCode::INTERNAL_SERVER_ERROR,
                format!("internal: RoleAuthorization of role: {} not found", role),
            )
            .into_response(),
            SessionError::InvalidHeaderValue { header_name, error } => {
                Response::error_message_with_status(
                    StatusCode::BAD_REQUEST,
                    format!(
                        "the value of the header '{}' isn't a valid string: '{}'",
                        header_name, error
                    ),
                )
                .into_response()
            }
        }
    }