Apple Maps Server token generation and exchange.
Apple's flow has two steps:
- Sign an ES256 JWT with your Maps private key (
.p8), identifying the Maps key via thekidheader and your Team ID via theissclaim. - Exchange that JWT for a short-lived access token at
GET /v1/token. 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 Maps access token.
Like access_token/1 but also returns the unix-epoch expiry time, for cache use.
Build and sign the Apple Maps auth JWT (ES256).
Types
@type jwt() :: String.t()
Functions
Sign a JWT and exchange it for an Apple Maps access token.
Like access_token/1 but also returns the unix-epoch expiry time, for cache use.
Build and sign the Apple Maps auth JWT (ES256).