pub struct OAuth2 {
pub enabled: bool,
pub issuer_url: Option<String>,
pub client_id: Option<String>,
pub client_secret: Option<String>,
pub scopes: Vec<String>,
pub auto_provision_users: bool,
pub admin_group_claim: Option<String>,
pub admin_group_value: Option<String>,
pub read_only_group_claim: Option<String>,
pub read_only_group_value: Option<String>,
pub button_text: String,
}Expand description
OAuth2/OpenID Connect authentication configuration
Fields§
§enabled: boolEnable OAuth2/OIDC authentication
issuer_url: Option<String>OIDC issuer URL (discovery URL, e.g., <https://authentik.example.com/application/o/kellnr/>)
client_id: Option<String>OAuth2 client ID
client_secret: Option<String>OAuth2 client secret (prefer setting via KELLNR_OAUTH2__CLIENT_SECRET env var)
scopes: Vec<String>OAuth2 scopes to request (default: ["openid", "profile", "email"])
auto_provision_users: boolAutomatically create local user accounts for new OAuth2 users
admin_group_claim: Option<String>Claim name to check for admin group membership (e.g., “groups”)
admin_group_value: Option<String>Value in the admin group claim that grants admin privileges (e.g., “kellnr-admins”)
read_only_group_claim: Option<String>Claim name to check for read-only group membership (e.g., “groups”)
read_only_group_value: Option<String>Value in the read-only group claim that grants read-only access (e.g., “kellnr-readonly”)
Text displayed on the OAuth2 login button
Implementations§
Trait Implementations§
Source§impl ClapSerde for OAuth2
impl ClapSerde for OAuth2
Source§impl<'de> Deserialize<'de> for OAuth2
impl<'de> Deserialize<'de> for OAuth2
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for OAuth2
impl StructuralPartialEq for OAuth2
Auto Trait Implementations§
impl Freeze for OAuth2
impl RefUnwindSafe for OAuth2
impl Send for OAuth2
impl Sync for OAuth2
impl Unpin for OAuth2
impl UnsafeUnpin for OAuth2
impl UnwindSafe for OAuth2
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.