Apple Business Registry token generation and exchange.
Apple's flow has two steps:
- Sign an ES256 JWT with your Business Registry private key (
.p8), identifying the Business key via thekidheader and your Team ID via theissclaim. - Exchange that JWT for a short-lived access token at
POST /v1/token/oauth2. That access token is what every subsequent API call must send as itsAuthorization: Bearercredential.
generate_jwt/1 does step 1; access_token/1 does both.
Summary
Functions
Sign a JWT and exchange it for an Apple Business Registry access token.
Like access_token/1 but also returns the unix-epoch expiry time, for cache use.
Build and sign the Apple Business Registry auth JWT (ES256).
Types
@type jwt() :: String.t()
Functions
Sign a JWT and exchange it for an Apple Business Registry access token.
Like access_token/1 but also returns the unix-epoch expiry time, for cache use.
Build and sign the Apple Business Registry auth JWT (ES256).