Runtime OAuth client configuration: the metadata document paired with the private client-authentication key.
Confidential clients keep a long-lived ES256 key; the matching public JWK
is published in the client metadata document (jwks), and the private key
signs the private_key_jwt client assertions used at the PAR and token
endpoints. Public clients (e.g. loopback development clients) carry no key
and authenticate with PKCE alone.
Summary
Functions
Mint a private_key_jwt client assertion (RFC 7523) for an authorization
server: iss/sub are the client_id, aud is the server issuer.
The client identifier (client_id URL).
Whether the client authenticates with private_key_jwt.
Rebuild a client serialized with to_map/1.
Build a client.
Like new/1, but raises on invalid input.
The client as a plain, Jason-encodable map for persistence.
Types
@type t() :: %Exosphere.ATProto.OAuth.Client{ key: map() | nil, metadata: Exosphere.ATProto.OAuth.ClientMetadata.t(), redirect_uri: String.t() }
Functions
Mint a private_key_jwt client assertion (RFC 7523) for an authorization
server: iss/sub are the client_id, aud is the server issuer.
Options
:iat- issuance time in seconds (defaults to now); for tests
The client identifier (client_id URL).
Whether the client authenticates with private_key_jwt.
Rebuild a client serialized with to_map/1.
Enum fields may have become strings through a JSON round-trip; they are normalized back to atoms.
Build a client.
Options
:metadata(required) -ClientMetadata.t():key- private JWK map; required for confidential clients, forbidden for public ones:redirect_uri(required) - one ofmetadata.redirect_uris
Like new/1, but raises on invalid input.
The client as a plain, Jason-encodable map for persistence.