Documentation
¶
Overview ¶
Package dpoptest mints DPoP proofs for tests. It lives under internal/ so the enforcement tests in middleware, extension and authprovider can share one minting path instead of copying the JWS assembly into every package that needs to present a proof.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Key ¶
func Key(t *testing.T) *ecdsa.PrivateKey
Key generates an ES256 key pair for a test client to hold.
func MintProof ¶
MintProof builds a signed DPoP proof. Claims left out of claims are simply absent, so a test can produce a proof missing exactly one claim.
func Thumbprint ¶
func Thumbprint(t *testing.T, key *ecdsa.PrivateKey) string
Thumbprint computes the RFC 7638 thumbprint a proof minted with key will carry, so a test can bind a session to it up front.
func ValidClaims ¶
ValidClaims builds the mandatory claim set for a proof covering method against htu. Callers add ath themselves, since a proof presented at a protected resource needs it and a proof presented at a token endpoint does not.
Types ¶
This section is empty.