ExAcme.AccountKey (ExAcme v0.3.0)
View SourceHandles the ACME account key operations.
Provides functionalities to generate keys, sign requests, and manage key identifiers.
Attributes
key
- The JOSE JSON Web Key (JWK).algorithm
- The algorithm of the key (e.g., ES256).kid
- The Key ID assigned by the server.
Summary
Functions
Creates a new account key from a JOSE JSON Web Key (JWK) and the Key ID assigned by the server.
Signs a request body with the account key.
Generates the thumbprint of the account key.
Converts the account key to its public representation.
Types
@type t() :: %ExAcme.AccountKey{ algorithm: String.t(), key: JOSE.JWK.t(), kid: String.t() }
Account key for authenticating requests
Functions
@spec new(JOSE.JWK.t(), String.t() | nil) :: t()
Creates a new account key from a JOSE JSON Web Key (JWK) and the Key ID assigned by the server.
Parameters
key
- The JOSE JSON Web Key (JWK).kid
- The Key ID assigned by the server.
Returns
- A new
ExAcme.AccountKey
struct.
Signs a request body with the account key.
Parameters
account_key
- The account key.body
- The request body to sign.header
- Additional headers.
Returns
- The signed JSON Web Signature (JWS).
Generates the thumbprint of the account key.
Parameters
account_key
- The account key.
Returns
- The thumbprint as a string.
Converts the account key to its public representation.
Parameters
account_key
- The account key.
Returns
- A map representing the public JSON Web Key (JWK).