mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-29 03:47:33 +00:00
feat: Request profile scope from OIDC providers by default
This commit is contained in:
1 parent
a6e051fa3b
commit
9877464857
2 files changed
+11
-5
No files matched your search
@@ -2582,10 +2582,12 @@
|
||||
|
||||
# Additional scopes Continuwuity should request from the IDP. This may be
|
||||
# necessary to access certain claims. Continuwuity always requests the
|
||||
# `openid` scope.
|
||||
# `openid` scope, regardless of the contents of this option,
|
||||
# and will also request the `profile` scope by default if this option is
|
||||
# not set.
|
||||
#
|
||||
# env: CONTINUWUITY_OAUTH__OIDC__ADDITIONAL_SCOPES
|
||||
#additional_scopes = []
|
||||
#additional_scopes = ["profile"]
|
||||
|
||||
# Additional trusted audiences that Continuwuity will accept in the `aud`
|
||||
# claim of the OIDC token returned by the IDP. If your identity
|
||||
|
||||
@@ -2823,10 +2823,12 @@ pub struct OidcConfig {
|
||||
|
||||
/// Additional scopes Continuwuity should request from the IDP. This may be
|
||||
/// necessary to access certain claims. Continuwuity always requests the
|
||||
/// `openid` scope.
|
||||
/// `openid` scope, regardless of the contents of this option,
|
||||
/// and will also request the `profile` scope by default if this option is
|
||||
/// not set.
|
||||
///
|
||||
/// default: []
|
||||
#[serde(default)]
|
||||
/// default: ["profile"]
|
||||
#[serde(default = "default_additional_scopes")]
|
||||
pub additional_scopes: Vec<Scope>,
|
||||
|
||||
/// Additional trusted audiences that Continuwuity will accept in the `aud`
|
||||
@@ -3446,6 +3448,8 @@ fn default_unauthenticated_request_ratelimit<K: Hash + Eq + Clone>() -> PerMinut
|
||||
PerMinuteRatelimiter::new(Quota::per_minute(30.try_into().unwrap()))
|
||||
}
|
||||
|
||||
fn default_additional_scopes() -> Vec<Scope> { vec![Scope::new("profile".to_owned())] }
|
||||
|
||||
// NOTE: This must be declared *after* every config struct in this file. The
|
||||
// example config generator writes sections in macro expansion order, and the
|
||||
// `global` section truncates the file, so declaring this module any earlier
|
||||
|
||||
Reference in new issue
Block a user