Module dpop

Source
Expand description

DPoP (RFC 9449) proof-of-possession verifier.

Verifies the DPoP proof JWT in the DPoP header against the access token’s cnf.jkt claim (RFC 9449 §4.2). Replay protection via JtiTracker.

Verification steps (RFC 9449 §4.2 + RFC 7638):

  1. Parse the compact JWS; require 3 segments.
  2. Require header typ == "dpop+jwt" and alg in the whitelist.
  3. Extract the public key from header jwk. Require kty=OKP, crv=Ed25519, x is 32 base64url-encoded bytes.
  4. Compute the JWK thumbprint per RFC 7638 and require it equals expected_jkt (the cnf.jkt value from the access token).
  5. Verify the EdDSA signature over header.payload using the jwk.
  6. Verify htm, htu, ath (SHA-256 base64url of the access token).
  7. Verify jti uniqueness via JtiTracker (SHA-256 keyed).

Structs§

DpopVerifier
Verifies DPoP proof JWTs.

Traits§

AsyncDpopReplayStore
Async replay-state port for stores that perform remote I/O.
DpopReplayStore
Atomic replay-state port used by DpopVerifier.