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