POST/api/v2/auth/dex/principal/token-exchange
Dex connectorInternal integration
Backchannel endpoint used by the Dex Principal connector for an OAuth 2.0 token exchange (RFC 8693). Dex sends the subject token a program presented. Principal finds the service account that trusts its issuer and subject, verifies the token and checks the access list of the application. No refresh handle is issued: every exchange is decided again.
Request body application/json · handler.DexPrincipalTokenExchangeRequest
Required4 of 4 fields
connectorIDstringrequired
applicationBindingIDstring · uuidrequired
subjectTokenstringrequired
subjectTokenTypestringrequired
Responses
200
OK
handler.DexPrincipalConnectorIdentityResponse · 7 fields
userIDstringrequired
usernamestringrequired
preferredUsernamestringrequired
emailstringrequired
emailVerifiedbooleanrequired
groupsarray of stringrequired
refreshHandlestring
401
Unauthorized: invalid connector credentials, or the subject token was rejected.
403
Access denied for Dex required-group handling.
handler.DexPrincipalConnectorAccessDeniedResponse · 2 fields
503
Service Unavailable: the connector is disabled, or Principal could not read the keys of the issuer.
Common errors: 400 413 429 500 504. They mean the same for every operation, see Errors.