ProxyAuthK8S
ApiAuth_clusters

Exchange a proxy-minted authorization code for the upstream tokens

POST
/clusters/{ns}/{cluster}/oauth/token

RFC 6749 §4.1.3 token endpoint. If the cluster is not found, disabled, or discovery is not enabled, return 404.

Path Parameters

ns*string

Namespace containing the cluster.

cluster*string

Cluster name that should exist in the namespace.

Request Body

application/x-www-form-urlencoded
  1. body

The token request, form-encoded (RFC 6749 §4.1.3 and §6).

code*string

The proxy-minted code returned by /oauth/callback.

code_verifier*string

RFC 7636 PKCE verifier for the code_challenge presented at /oauth/authorize.

grant_type*string

Must be authorization_code; this server only implements that grant.

redirect_uri*string

Must match the redirect_uri presented at /oauth/authorize (RFC 6749 §4.1.3).

Response Body

The tokens for the cluster: access, ID and refresh.

application/json
  1. response

A successful token response (RFC 6749 §5.1).

access_token*string
expires_in?|
Formatint64
id_token*string
refresh_token?string|null
scope*string
token_type*string
Example Request
curl -X POST 'https://example.com/clusters/string/string/oauth/token' \  -H 'Content-Type: application/x-www-form-urlencoded' \  -d 'code=string&code_verifier=string&grant_type=string&redirect_uri=string'
Example Response
{  "access_token": "string",  "expires_in": 0,  "id_token": "string",  "refresh_token": "string",  "scope": "string",  "token_type": "string"}