pub struct OAuthProviderRemoteConfig {
pub well_known_url: Option<String>,
pub issuer_url: Option<String>,
pub jwks_uri: Option<String>,
pub metadata_refresh_interval: Duration,
pub jwks_refresh_interval: Duration,
}Expand description
Shared provider connectivity settings used by both OIDC clients and resource-server verifiers.
Fields§
§well_known_url: Option<String>OpenID Connect discovery document URL.
When set, the runtime fetches remote metadata and periodically refreshes
it when metadata_refresh_interval > 0.
issuer_url: Option<String>§jwks_uri: Option<String>§metadata_refresh_interval: DurationRefresh interval for the discovery metadata cache.
Set to 0 to disable periodic discovery refresh.
jwks_refresh_interval: DurationRefresh interval for the remote JWKS cache.
Set to 0 to disable time-based JWKS refresh.
Implementations§
Source§impl OAuthProviderRemoteConfig
impl OAuthProviderRemoteConfig
pub fn validate(&self) -> Result<(), OAuthProviderError>
Sourcepub fn is_discovery_configured(&self) -> bool
pub fn is_discovery_configured(&self) -> bool
Returns true when at least one discovery source is configured
(well_known_url, issuer_url, or jwks_uri).
When false, no OIDC discovery or JWK resolution can take place,
meaning a resource-server verifier should not be constructed.
Trait Implementations§
Source§impl Clone for OAuthProviderRemoteConfig
impl Clone for OAuthProviderRemoteConfig
Source§fn clone(&self) -> OAuthProviderRemoteConfig
fn clone(&self) -> OAuthProviderRemoteConfig
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 OAuthProviderRemoteConfig
impl Debug for OAuthProviderRemoteConfig
Source§impl Default for OAuthProviderRemoteConfig
impl Default for OAuthProviderRemoteConfig
Source§fn default() -> OAuthProviderRemoteConfig
fn default() -> OAuthProviderRemoteConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for OAuthProviderRemoteConfig
impl<'de> Deserialize<'de> for OAuthProviderRemoteConfig
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<OAuthProviderRemoteConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<OAuthProviderRemoteConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for OAuthProviderRemoteConfig
impl RefUnwindSafe for OAuthProviderRemoteConfig
impl Send for OAuthProviderRemoteConfig
impl Sync for OAuthProviderRemoteConfig
impl Unpin for OAuthProviderRemoteConfig
impl UnsafeUnpin for OAuthProviderRemoteConfig
impl UnwindSafe for OAuthProviderRemoteConfig
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