pub struct GenericOAuthConfig {Show 14 fields
pub provider: OAuthProvider,
pub discovery_url: Option<String>,
pub discovery_headers: Vec<(String, String)>,
pub authorization_url: Option<String>,
pub token_url: Option<String>,
pub user_info_url: Option<String>,
pub end_session_endpoint: Option<String>,
pub post_logout_redirect_uri: Option<String>,
pub disable_provider_logout: bool,
pub require_id_token_verification: bool,
pub disable_id_token_nonce_binding: bool,
pub map_profile: Option<Arc<dyn OAuthProfileMapper>>,
pub access_token_expires_in: Option<f64>,
pub account_key: Option<OAuthAccountKey>,
}Expand description
Discovery is an operator-configured authority, never a request-selected URL.
Resolve once before registering the provider with OAuthPlugin.
Fields§
§provider: OAuthProvider§discovery_url: Option<String>§discovery_headers: Vec<(String, String)>None permits discovery; Some, including empty, retains the override.
token_url: Option<String>§user_info_url: Option<String>§end_session_endpoint: Option<String>§post_logout_redirect_uri: Option<String>Default return URI, resolved against the auth base URL at sign-out.
disable_provider_logout: boolKeep local sign-out without a provider logout URL.
require_id_token_verification: bool§disable_id_token_nonce_binding: bool§map_profile: Option<Arc<dyn OAuthProfileMapper>>§access_token_expires_in: Option<f64>Fallback expiry in seconds when a default or custom grant omits it.
account_key: Option<OAuthAccountKey>Implementations§
Source§impl GenericOAuthConfig
impl GenericOAuthConfig
pub fn new( client_id: impl Into<String>, client_secret: impl Into<String>, ) -> Self
Sourcepub async fn resolve(
self,
) -> Result<Option<GenericOAuthResolved>, GenericOAuthError>
pub async fn resolve( self, ) -> Result<Option<GenericOAuthResolved>, GenericOAuthError>
Failed discovery falls back to configured endpoints. Ok(None) skips an
unusable discovered provider, as the published initialization does.
Auto Trait Implementations§
impl !RefUnwindSafe for GenericOAuthConfig
impl !UnwindSafe for GenericOAuthConfig
impl Freeze for GenericOAuthConfig
impl Send for GenericOAuthConfig
impl Sync for GenericOAuthConfig
impl Unpin for GenericOAuthConfig
impl UnsafeUnpin for GenericOAuthConfig
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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