Skip to main content

verify_client_assertion

Function verify_client_assertion 

Source
pub async fn verify_client_assertion(
    state: &OAuthState,
    client: &RegisteredClient,
    assertion_type: &str,
    assertion: &str,
    expected_audiences: &[String],
) -> Result<VerifiedAssertion, ClientAuthError>
Expand description

Verify an RFC 7523 client_assertion against the registered client’s JWKS — inline jwks if present, otherwise fetched from jwks_uri (cached for state.client_jwks_uri_cache_ttl). expected_audiences is the accepted aud set — on every profile path this is the AS issuer alone (atproto mandate, #1146 T1.2).

On success, records the assertion’s jti in the replay registry (single-use per client until exp) and returns the verified claims plus the verifying key’s thumbprint for session binding.