pub struct RemoteJwksVerifierConfig {
pub jwks_url: String,
pub http_timeout: Duration,
pub refresh_interval: Duration,
pub cache_path: Option<PathBuf>,
}Expand description
Configuration for a RemoteJwksVerifier.
Fields§
§jwks_url: StringURL of the remote JWKS endpoint.
http_timeout: DurationHTTP request timeout for JWKS fetches.
refresh_interval: DurationInterval between background refresh attempts.
cache_path: Option<PathBuf>Optional path for persisting the JWKS document as a local cache.
Implementations§
Source§impl RemoteJwksVerifierConfig
impl RemoteJwksVerifierConfig
Sourcepub fn from_jwks_url(jwks_url: impl Into<String>) -> Self
pub fn from_jwks_url(jwks_url: impl Into<String>) -> Self
Build a config from a JWKS URL with default timeout and refresh interval.
Sourcepub fn with_http_timeout(self, timeout: Duration) -> Self
pub fn with_http_timeout(self, timeout: Duration) -> Self
Override the HTTP request timeout.
Sourcepub fn with_refresh_interval(self, refresh_interval: Duration) -> Self
pub fn with_refresh_interval(self, refresh_interval: Duration) -> Self
Override the background refresh interval.
Sourcepub fn with_cache_path(self, cache_path: impl Into<PathBuf>) -> Self
pub fn with_cache_path(self, cache_path: impl Into<PathBuf>) -> Self
Enable a persistent local cache at the given path.
Trait Implementations§
Source§impl Clone for RemoteJwksVerifierConfig
impl Clone for RemoteJwksVerifierConfig
Source§fn clone(&self) -> RemoteJwksVerifierConfig
fn clone(&self) -> RemoteJwksVerifierConfig
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 RemoteJwksVerifierConfig
impl RefUnwindSafe for RemoteJwksVerifierConfig
impl Send for RemoteJwksVerifierConfig
impl Sync for RemoteJwksVerifierConfig
impl Unpin for RemoteJwksVerifierConfig
impl UnsafeUnpin for RemoteJwksVerifierConfig
impl UnwindSafe for RemoteJwksVerifierConfig
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