pub struct IdentityProviderRegistration {Show 15 fields
pub tenant_id: String,
pub provider_id: String,
pub jwks_url: Url,
pub require_https: bool,
pub allowed_domains: Vec<String>,
pub refresh_early: Duration,
pub stale_while_error: Duration,
pub min_ttl: Duration,
pub max_ttl: Duration,
pub max_response_bytes: u64,
pub negative_cache_ttl: Duration,
pub max_redirects: u8,
pub pinned_spki: Vec<SpkiFingerprint>,
pub prefetch_jitter: Duration,
pub retry_policy: RetryPolicy,
}Expand description
Registration describing how to fetch and maintain JWKS for a provider.
Fields§
§tenant_id: StringTenant identifier used for metrics, caching, and persistence scope.
provider_id: StringProvider identifier unique within the tenant.
jwks_url: UrlURL of the JWKS endpoint to fetch signing keys from.
require_https: boolWhether HTTPS is required for JWKS retrieval.
allowed_domains: Vec<String>Optional allowlist of domains permitted for redirects.
refresh_early: DurationLead time before expiry to trigger proactive refresh.
stale_while_error: DurationDuration to continue serving stale data when refresh fails.
min_ttl: DurationMinimum TTL applied to upstream responses.
max_ttl: DurationMaximum TTL applied to upstream responses.
max_response_bytes: u64Maximum size allowed for JWKS payloads in bytes.
negative_cache_ttl: DurationTTL applied when persisting negative cache outcomes.
max_redirects: u8Maximum number of redirects to follow during fetch.
pinned_spki: Vec<SpkiFingerprint>Optional SPKI fingerprints used for TLS pinning.
prefetch_jitter: DurationRandom jitter applied when scheduling proactive refreshes.
retry_policy: RetryPolicyRetry policy configuration for JWKS fetch attempts.
Implementations§
Source§impl IdentityProviderRegistration
impl IdentityProviderRegistration
Sourcepub fn new(
tenant_id: impl Into<String>,
provider_id: impl Into<String>,
jwks_url: impl AsRef<str>,
) -> Result<Self>
pub fn new( tenant_id: impl Into<String>, provider_id: impl Into<String>, jwks_url: impl AsRef<str>, ) -> Result<Self>
Construct a new registration with default cache settings.
Sourcepub fn normalize_allowed_domains(&mut self)
pub fn normalize_allowed_domains(&mut self)
Canonicalise the domain allowlist in-place.
Sourcepub fn with_require_https(self, require_https: bool) -> Self
pub fn with_require_https(self, require_https: bool) -> Self
Set HTTPS requirement to the desired value.
Trait Implementations§
Source§impl Clone for IdentityProviderRegistration
impl Clone for IdentityProviderRegistration
Source§fn clone(&self) -> IdentityProviderRegistration
fn clone(&self) -> IdentityProviderRegistration
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more