Skip to main content

Module token

Module token 

Source
Expand description

OAuth 2.1 Token Endpoint.

POST /oauth/token — exchanges authorization code, device code, or refresh token for an access token.

Supports:

  • grant_type=authorization_code — PKCE + PolicyClient delegation
  • grant_type=urn:ietf:params:oauth:grant-type:device_code — RFC 8628 device flow
  • grant_type=refresh_token — OAuth 2.1 token refresh with rotation

Structs§

TokenRequest
Token exchange request (application/x-www-form-urlencoded).

Functions§

exchange_token
POST /oauth/token — token exchange