pub struct PasIdTokenVerifier<S: ScopePiiReader> { /* private fields */ }Expand description
Re-export of the production id_token verifier adapter. PAS OIDC id_token verifier (RFC 9068 + OIDC Core 1.0, EdDSA).
Constructed once per consumer deployment with the JWKS URL and the
per-deployment VerifyConfig. Cheap to clone — internal state is
Arc-shared, so you can store the verifier behind
Arc<dyn IdTokenVerifier<S>> in a request extension or per-route
layer without measurable overhead.
JwksCache and ArcClock have no useful Debug representation,
so this is a manual impl that surfaces only the expectations shape.
As of 0.8.0 the containing oidc::verifier module is pub(crate).
Production consumers reach the verify-half through
super::RelyingParty<S>::complete, which constructs and consumes
this verifier internally. SDK boundary tests + downstream consumer
integration tests reach the type via the
crate::test_support::PasIdTokenVerifier re-export under the
test-support feature gate.
Implementations§
Source§impl<S: ScopePiiReader> PasIdTokenVerifier<S>
impl<S: ScopePiiReader> PasIdTokenVerifier<S>
Sourcepub async fn from_jwks_url(
jwks_url: impl Into<String>,
expectations: VerifyConfig,
) -> Result<Self, IdVerifyError>
pub async fn from_jwks_url( jwks_url: impl Into<String>, expectations: VerifyConfig, ) -> Result<Self, IdVerifyError>
Single textbook constructor — mirror of
PasJwtVerifier::from_jwks_url.
Performs an initial JWKS fetch + cache; subsequent verifications
snapshot the cache, refreshing on TTL expiry.
§Errors
Returns IdVerifyError::KeysetUnavailable if the initial JWKS
fetch fails. The verifier cannot serve verifications without at
least one usable key snapshot.
Sourcepub fn for_test_skip_fetch(expectations: VerifyConfig) -> Self
pub fn for_test_skip_fetch(expectations: VerifyConfig) -> Self
Test-support ctor — constructs a verifier without performing a
JWKS fetch. Mirror of
PasJwtVerifier::for_test_skip_fetch.
The internal keyset is empty, so any engine verify path rejects
on KidUnknown (mapped to IdVerifyError::SignatureInvalid
per [map_auth_error]). Adapter-side rejection paths
(IdVerifyError::InvalidFormat) are fully exercisable since
they reject before consulting the keyset.
Used by Phase 10.11.E’s boundary tests to drive the verify path
without a wiremock-shaped JWKS endpoint. NOT for production use
— use Self::from_jwks_url instead.
Trait Implementations§
Source§impl<S: Clone + ScopePiiReader> Clone for PasIdTokenVerifier<S>
impl<S: Clone + ScopePiiReader> Clone for PasIdTokenVerifier<S>
Source§fn clone(&self) -> PasIdTokenVerifier<S>
fn clone(&self) -> PasIdTokenVerifier<S>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more