mirror of
https://codeberg.org/pfzetto/axum-oidc
synced 2025-12-09 22:55:17 +01:00
add auth context value with static value of 2
This commit is contained in:
parent
e62aba722c
commit
787b0c8dde
1 changed files with 3 additions and 6 deletions
|
|
@ -15,12 +15,7 @@ use tower_service::Service;
|
||||||
use tower_sessions::Session;
|
use tower_sessions::Session;
|
||||||
|
|
||||||
use openidconnect::{
|
use openidconnect::{
|
||||||
core::{CoreAuthenticationFlow, CoreErrorResponseType, CoreGenderClaim},
|
core::{CoreAuthenticationFlow, CoreErrorResponseType, CoreGenderClaim}, reqwest::async_http_client, AccessToken, AccessTokenHash, AuthenticationContextClass, AuthorizationCode, CsrfToken, IdTokenClaims, Nonce, OAuth2TokenResponse, PkceCodeChallenge, PkceCodeVerifier, RedirectUrl, RefreshToken, RequestTokenError::ServerResponse, Scope, TokenResponse
|
||||||
reqwest::async_http_client,
|
|
||||||
AccessToken, AccessTokenHash, AuthorizationCode, CsrfToken, IdTokenClaims, Nonce,
|
|
||||||
OAuth2TokenResponse, PkceCodeChallenge, PkceCodeVerifier, RedirectUrl, RefreshToken,
|
|
||||||
RequestTokenError::ServerResponse,
|
|
||||||
Scope, TokenResponse,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
|
|
@ -188,6 +183,8 @@ where
|
||||||
auth = auth.add_scope(Scope::new(scope.to_string()));
|
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()
|
auth.set_pkce_challenge(pkce_challenge).url()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue