pub struct SocialProviderConfig {
pub id: SocialProviderId,
pub provider_type: ProviderType,
pub display_name: String,
pub client_id: String,
pub client_secret: String,
pub scopes: Vec<String>,
pub enabled: bool,
pub priority: i64,
pub config: Option<Value>,
}Expand description
Runtime form of a social provider — secret decrypted, scopes parsed.
Produced by crate::db::Db::social_provider_to_config.
This is the form 7m5.2 will use when constructing a
Box<dyn SocialProvider> for an inbound OAuth callback.
config carries custom-OIDC endpoint URLs as a JSON object shaped like:
{
"discovery_url": "https://issuer/.well-known/openid-configuration",
"authorize_url": "https://issuer/oauth/authorize",
"token_url": "https://issuer/oauth/token",
"userinfo_url": "https://issuer/oauth/userinfo"
}Built-in providers (Google, Github, Apple, Microsoft) leave
config as None. Validation that the shape matches provider_type is
the impl’s responsibility (7m5.3 for CustomOidc).
Key rotation note: the mfa_key used to encrypt provider secrets is
the same AES-256-GCM key as for MFA secrets (spec §11 lists per-tenant
root-key derivation as a non-goal). Key rotation requires re-encrypting
all rows.
Fields§
§id: SocialProviderId§provider_type: ProviderType§display_name: String§client_id: String§client_secret: String§scopes: Vec<String>§enabled: bool§priority: i64§config: Option<Value>Trait Implementations§
Source§impl Clone for SocialProviderConfig
impl Clone for SocialProviderConfig
Source§fn clone(&self) -> SocialProviderConfig
fn clone(&self) -> SocialProviderConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SocialProviderConfig
impl RefUnwindSafe for SocialProviderConfig
impl Send for SocialProviderConfig
impl Sync for SocialProviderConfig
impl Unpin for SocialProviderConfig
impl UnsafeUnpin for SocialProviderConfig
impl UnwindSafe for SocialProviderConfig
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more