openid: configuration: split scopes and response types in own mods, to be used in ezidam later
This commit is contained in:
parent
3d065bbc22
commit
a0c0c3fa8f
6 changed files with 46 additions and 13 deletions
20
crates/openid/src/scopes.rs
Normal file
20
crates/openid/src/scopes.rs
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
use itertools::Itertools;
|
||||
use openidconnect::Scope;
|
||||
|
||||
pub struct SupportedScopes(pub Vec<Scope>);
|
||||
|
||||
impl SupportedScopes {
|
||||
pub fn url_format() -> String {
|
||||
Self::default().0.iter().map(|s| s.as_str()).join(" ")
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for SupportedScopes {
|
||||
fn default() -> Self {
|
||||
Self(vec![
|
||||
Scope::new("openid".to_string()),
|
||||
Scope::new("profile".to_string()),
|
||||
Scope::new("email".to_string()),
|
||||
])
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue