Latch. ClientAssertion
(latch v0.5.0)
Copy Markdown
Client assertion JWTs (RFC 7523 private_key_jwt) for atproto OAuth.
Confidential clients authenticate to the authorization server by signing a fresh assertion for every PAR and token request.
Summary
Functions
The client_assertion_type request parameter value.
Key ID for the client signing key: the JWK's own kid if set, otherwise
its RFC 7638 thumbprint.
Signs a client assertion JWT.
Functions
@spec assertion_type() :: String.t()
The client_assertion_type request parameter value.
Key ID for the client signing key: the JWK's own kid if set, otherwise
its RFC 7638 thumbprint.
The published client metadata JWKs must use the same value so the authorization server can match assertion headers to a key.
Signs a client assertion JWT.
Arguments
jwk- the client's private plain JWK mapclient_id- used as bothissandsubaudience- the authorization server'sissuerURL
Options
:jti- overridejti(tests):iat- overrideiat(tests)
exp is iat + 60s: atproto does not require it,
but RFC 7523 does, and servers expect assertions younger than a minute.