CloudKit Server Key token generation.
CloudKit uses a server key (ECDSA P-256 private key) to authenticate API requests. The JWT is signed ES256 and contains the container ID and server key ID.
Summary
Functions
Generate the CloudKit Server Key token for API access.
Like access_token/1 but also returns the unix-epoch expiry time, for cache use.
Build and sign the CloudKit Server Key JWT (ES256).
Build CloudKit's signed request headers for a request subpath and body.
Types
Functions
Generate the CloudKit Server Key token for API access.
Like access_token/1 but also returns the unix-epoch expiry time, for cache use.
Build and sign the CloudKit Server Key JWT (ES256).
@spec signed_headers(String.t(), binary(), keyword()) :: {:ok, signed_headers()} | {:error, term()}
Build CloudKit's signed request headers for a request subpath and body.