Reference / @open-music-sdk/server / tTokenEndpointOptions
Interface: tTokenEndpointOptions
Defined in: integrations/server/src/token-endpoint.ts:7
Invalid values throw a TypeError when the endpoint is made.
Extends
Omit<tMinterOptions,"origin"|"ttlSeconds">
Properties
keyId
readonly keyId: string;Defined in: packages/developer-token/src/mint.ts:19
The ID of the MusicKit key, the ten capital letters and digits in the file's name; becomes kid.
Inherited from
Omit.keyIdorigin
readonly origin: readonly string[];Defined in: integrations/server/src/token-endpoint.ts:13
The web origins the token is for, one at least, each exactly as a browser sends it: https://app.example, with no path and no trailing slash. Apple honours the claim for requests from browsers, and a request from one of these origins is answered with the CORS headers that let its page read the token.
pem
readonly pem: string;Defined in: packages/developer-token/src/mint.ts:15
The contents of AuthKey_XXXXXXXXXX.p8: a PKCS8 PEM. Line breaks escaped as \n, as an environment variable usually holds them, are accepted, and so are Windows line endings, a byte order mark and whitespace around it.
Inherited from
Omit.pemrefreshAheadSeconds?
readonly optional refreshAheadSeconds?: number;Defined in: packages/developer-token/src/mint.ts:33
Mint a replacement this long before exp. Default, and at most, half the lifetime.
Inherited from
Omit.refreshAheadSecondsteamId
readonly teamId: string;Defined in: packages/developer-token/src/mint.ts:17
Your Apple Developer Team ID, ten capital letters and digits as Apple issues it; becomes iss.
Inherited from
Omit.teamIdttlSeconds?
readonly optional ttlSeconds?: number;Defined in: integrations/server/src/token-endpoint.ts:15
The token's lifetime in whole seconds, from 60 to 86 400, one day. Default 900, fifteen minutes: a page can be read by anyone, and so can its token.