Skip to content

oauth: support the token exchange grant - #2500

Open
mjcheetham wants to merge 1 commit into
git-ecosystem:mainfrom
mjcheetham:oauth-tokenexchange
Open

mjcheetham wants to merge 1 commit into
git-ecosystem:mainfrom
mjcheetham:oauth-tokenexchange

Conversation

@mjcheetham

Copy link
Copy Markdown
Contributor

Add support for the RFC 8693 token-exchange grant to the shared OAuth2 client. This enables providers to exchange a token issued by an external identity provider for an OAuth access token accepted by the target host.

Expose GetTokenByTokenExchangeAsync with a subject token, its type, and the requested scopes. Add OAuth2TokenType and mappings for the standard token-type identifiers covering access tokens, refresh tokens, OpenID Connect ID tokens, and SAML 1.1/2.0 assertions.

Extend the in-memory OAuth server with subject-token grants and add tests for the exchange flow, token-type serialization, and parsing.

@mjcheetham
mjcheetham marked this pull request as ready for review November 9, 2026 14:08
@mjcheetham
mjcheetham requested a review from a team as a code owner November 9, 2026 14:08
@mjcheetham mjcheetham added the auth:oauth Specific to OAuth2 authentication label Nov 9, 2026
@mjcheetham
mjcheetham force-pushed the oauth-tokenexchange branch 2 times, most recently from 0620377 to 3155fa1 Compare November 10, 2026 10:41
Allow providers to exchange an existing access or refresh token for
an OAuth access token, using the RFC 8693 token exchange grant.

This enables authentication flows where a token issued by an external
identity provider must be exchanged for one accepted by the host.

Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auth:oauth Specific to OAuth2 authentication

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant