Expand description
private_key_jwt client authentication (RFC 7523 section 2.2, OIDC Core section 9).
The client proves who it is with a JWT signed by a key whose public half it registered, instead of sending a shared
secret. The service (services/client_assertion.rs) accepts it at the token endpoint and the pushed authorization
endpoint only, and requires: RS256, PS256 or ES256; iss and sub both the client id; aud the URL of the
endpoint it is presented to (or the issuer); an exp at most 300 seconds ahead; a jti it has not seen. An
assertion is single use: create_client_assertion mints a new one, with a new random jti, per request.
Structs§
- Client
Assertion Key - A private key registered for a client. The private half cannot be read back from this value, and it prints only
the algorithm and the
kid. - Client
Assertion Options - Test hooks and the lifetime of one assertion.
Constants§
- CLIENT_
ASSERTION_ TYPE client_assertion_typefor a JWT assertion (RFC 7523).- DEFAULT_
CLIENT_ ASSERTION_ LIFETIME_ SECONDS - Lifetime of an assertion when the caller does not say.
- MAX_
CLIENT_ ASSERTION_ LIFETIME_ SECONDS - The service refuses an assertion whose
expis further than this ahead.
Functions§
- create_
client_ assertion - A signed assertion for
audience:<issuer>/oauth/tokenor<issuer>/oauth/par. - import_
client_ assertion_ key - Load a private key for
private_key_jwt: a private JWK or a PKCS#8 PEM.