pub struct ProviderConfig {Show 16 fields
pub provider_type: ProviderType,
pub client_id: String,
pub client_secret: String,
pub issuer_url: String,
pub authorization_endpoint: Option<String>,
pub token_endpoint: Option<String>,
pub userinfo_endpoint: Option<String>,
pub device_authorization_endpoint: Option<String>,
pub jwks_uri: Option<String>,
pub scopes: Vec<String>,
pub allowed_domains: Vec<String>,
pub required_groups: Vec<String>,
pub group_claim: String,
pub email_claim: String,
pub name_claim: String,
pub additional_params: HashMap<String, String>,
}Expand description
Provider configuration
Fields§
§provider_type: ProviderTypeProvider type
client_id: StringOAuth2 Client ID
client_secret: StringOAuth2 Client Secret (encrypted at rest)
issuer_url: StringIssuer URL (for OIDC discovery)
Authorization endpoint (optional, discovered via OIDC)
token_endpoint: Option<String>Token endpoint (optional, discovered via OIDC)
userinfo_endpoint: Option<String>UserInfo endpoint (optional)
Device authorization endpoint (for device flow)
jwks_uri: Option<String>JWKS URI for token validation
scopes: Vec<String>Scopes to request
allowed_domains: Vec<String>Allowed domains (empty = all allowed)
required_groups: Vec<String>Required groups (user must be in at least one)
group_claim: StringGroup claim name in ID token
email_claim: StringEmail claim name in ID token
name_claim: StringName claim name in ID token
additional_params: HashMap<String, String>Additional parameters for authorization URL
Implementations§
Source§impl ProviderConfig
impl ProviderConfig
Sourcepub fn google(
client_id: &str,
client_secret: &str,
allowed_domain: Option<&str>,
) -> Self
pub fn google( client_id: &str, client_secret: &str, allowed_domain: Option<&str>, ) -> Self
Create a Google provider configuration
Sourcepub fn microsoft(client_id: &str, client_secret: &str, tenant_id: &str) -> Self
pub fn microsoft(client_id: &str, client_secret: &str, tenant_id: &str) -> Self
Create a Microsoft provider configuration
Sourcepub fn okta(
client_id: &str,
client_secret: &str,
domain: &str,
auth_server_id: Option<&str>,
) -> Self
pub fn okta( client_id: &str, client_secret: &str, domain: &str, auth_server_id: Option<&str>, ) -> Self
Create an Okta provider configuration
Trait Implementations§
Source§impl Clone for ProviderConfig
impl Clone for ProviderConfig
Source§fn clone(&self) -> ProviderConfig
fn clone(&self) -> ProviderConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProviderConfig
impl Debug for ProviderConfig
Source§impl<'de> Deserialize<'de> for ProviderConfig
impl<'de> Deserialize<'de> for ProviderConfig
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
Auto Trait Implementations§
impl Freeze for ProviderConfig
impl RefUnwindSafe for ProviderConfig
impl Send for ProviderConfig
impl Sync for ProviderConfig
impl Unpin for ProviderConfig
impl UnwindSafe for ProviderConfig
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