mirror of
https://git.proxmox.com/git/proxmox
synced 2025-08-11 22:33:26 +00:00
allow to configure acr values
This commit is contained in:
parent
897c5c7569
commit
6454a54704
@ -36,6 +36,7 @@ use openidconnect::{
|
||||
Scope,
|
||||
UserInfoClaims,
|
||||
AdditionalClaims,
|
||||
AuthenticationContextClass,
|
||||
};
|
||||
|
||||
/// Stores Additional Claims into a serde_json::Value;
|
||||
@ -55,6 +56,8 @@ pub struct OpenIdConfig {
|
||||
pub scopes: Option<Vec<String>>,
|
||||
#[serde(skip_serializing_if="Option::is_none")]
|
||||
pub prompt: Option<String>,
|
||||
#[serde(skip_serializing_if="Option::is_none")]
|
||||
pub acr_values: Option<Vec<String>>,
|
||||
}
|
||||
|
||||
pub struct OpenIdAuthenticator {
|
||||
@ -175,6 +178,12 @@ impl OpenIdAuthenticator {
|
||||
}
|
||||
}
|
||||
|
||||
if let Some(ref acr_values) = self.config.acr_values {
|
||||
for acr in acr_values.clone() {
|
||||
request = request.add_auth_context_value(AuthenticationContextClass::new(acr));
|
||||
}
|
||||
}
|
||||
|
||||
let (authorize_url, _csrf_state, _nonce) = request.url();
|
||||
|
||||
Ok(authorize_url.to_string())
|
||||
|
Loading…
Reference in New Issue
Block a user