Expand description
The bearer-token abstraction the Client mints from.
App Store Connect wants a short-lived ES256 JWT on every request. The
usual way to produce one is an ApiKey signing its own
claims, but it isn’t the only way: CI often injects a token minted
elsewhere, and tests want a fixed string. TokenSource is the seam
that lets all three flow through the same client without the client
caring which it holds.
Client::new takes impl IntoTokenSource, so
Client::new(api_key) keeps working unchanged while a
StaticToken or any custom source is equally accepted.
Structs§
- Minted
Token - A freshly minted bearer token and how long it stays valid.
- Static
Token - A fixed, already-minted bearer token.
Traits§
- Into
Token Source - Conversion into a boxed
TokenSource, soClient::newcan accept anApiKey, aStaticToken, aBox<dyn TokenSource>, or any custom source with one signature. - Token
Source - Anything that can produce a bearer token for the client.