pub enum TokenExchangeShape {
Standard,
AppleJwt,
BasicAuth,
JsonBody,
BasicAuthJsonBody,
}Expand description
Provider-specific token exchange request shape.
Variants§
Standard
Standard grant_type=authorization_code&... form body with the
client_id + client_secret embedded as form fields. Covers
Google, GitHub, Discord, Slack, Spotify, and most providers.
AppleJwt
Apple: client_secret is a JWT signed with the developer’s
ES256 private key (NOT a static string). The key id and team
id are needed to mint it. See [apple_jwt] for the signer.
BasicAuth
HTTP Basic auth instead of form fields for client_id /
client_secret. Body still carries
grant_type=authorization_code&code=…&redirect_uri=….
OIDC’s default per the discovery spec when
token_endpoint_auth_methods_supported is omitted.
JsonBody
JSON body — { "grant_type": "authorization_code", "code": …, "redirect_uri": …, "client_id": …, "client_secret": … }.
Atlassian 3LO requires this.
BasicAuthJsonBody
JSON body + HTTP Basic auth header. Notion uses this:
the body carries grant_type + code + redirect_uri,
the credentials live in the Authorization header.
Trait Implementations§
Source§impl Clone for TokenExchangeShape
impl Clone for TokenExchangeShape
Source§fn clone(&self) -> TokenExchangeShape
fn clone(&self) -> TokenExchangeShape
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more