add auth context value with static value of 2

This commit is contained in:
Michael Michel 2024-05-24 14:39:22 +02:00
parent e62aba722c
commit 787b0c8dde

View file

@ -15,12 +15,7 @@ use tower_service::Service;
use tower_sessions::Session;
use openidconnect::{
core::{CoreAuthenticationFlow, CoreErrorResponseType, CoreGenderClaim},
reqwest::async_http_client,
AccessToken, AccessTokenHash, AuthorizationCode, CsrfToken, IdTokenClaims, Nonce,
OAuth2TokenResponse, PkceCodeChallenge, PkceCodeVerifier, RedirectUrl, RefreshToken,
RequestTokenError::ServerResponse,
Scope, TokenResponse,
core::{CoreAuthenticationFlow, CoreErrorResponseType, CoreGenderClaim}, reqwest::async_http_client, AccessToken, AccessTokenHash, AuthenticationContextClass, AuthorizationCode, CsrfToken, IdTokenClaims, Nonce, OAuth2TokenResponse, PkceCodeChallenge, PkceCodeVerifier, RedirectUrl, RefreshToken, RequestTokenError::ServerResponse, Scope, TokenResponse
};
use crate::{
@ -188,6 +183,8 @@ where
auth = auth.add_scope(Scope::new(scope.to_string()));
}
auth = auth.add_auth_context_value(AuthenticationContextClass::new(String::from("2")));
auth.set_pkce_challenge(pkce_challenge).url()
};