#[non_exhaustive]pub struct Config {
pub client_id: String,
pub redirect_uri: Url,
pub issuer: Url,
pub state_ttl: Duration,
pub resource: Option<String>,
}Expand description
PAS OAuth client + RP configuration.
Construction input to super::RelyingParty::new. Mirrors the
“public OAuth client” pattern (RCW / CTW precedent — no
client_secret; PKCE S256 mandatory). TTL knobs for state-store
entries are bundled here so a consumer that picks non-default
lifetimes does so once at boot, not at every start.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.client_id: String§redirect_uri: Url§issuer: Url§state_ttl: DurationState entry TTL in the substrate. Default 10 minutes (RFC 9700 §4.1.2 guidance).
resource: Option<String>RFC 8707 resource indicator (an absolute URI, raw string) this RP
sends on every OAuth leg — authorize, token, refresh — so PAS mints
aud = <resource> and the resource-server perimeter admits it (G2).
None (the RCW/CTW identity-only default) keeps aud = client_id.
A raw String, never a Url: PAS byte-matches it against
OAUTH_RESOURCE_INDICATORS, and Url would append a trailing slash
to a host-only URI and miss the match.
Implementations§
Source§impl Config
impl Config
pub fn new(client_id: impl Into<String>, redirect_uri: Url, issuer: Url) -> Self
pub fn with_state_ttl(self, ttl: Duration) -> Self
Sourcepub fn with_resource(self, resource: impl Into<String>) -> Self
pub fn with_resource(self, resource: impl Into<String>) -> Self
Set the RFC 8707 resource indicator (see Self::resource). A
PCS-bound RP (CWC) sets the session-face resource URI here; identity
RPs leave it unset.