Skip to content

oauth: support the JWT bearer grant - #2507

Draft
mjcheetham wants to merge 3 commits into
git-ecosystem:mainfrom
mjcheetham:oauth-jwtgrant
Draft

mjcheetham wants to merge 3 commits into
git-ecosystem:mainfrom
mjcheetham:oauth-jwtgrant

Conversation

@mjcheetham

Copy link
Copy Markdown
Contributor

Following #2500, add support for the RFC 7523 JWT bearer grant to the shared OAuth2 client. This lets callers exchange a JWT assertion for an OAuth access token.

Send the assertion as provided without parsing it, and omit the scope parameter when no scopes are requested so the authorization server can apply its defaults. Extend the in-memory OAuth server and add coverage for the grant flow.

RFC 7523 section 2.1

@mjcheetham mjcheetham added the auth:oauth Specific to OAuth2 authentication label Nov 10, 2026
@rrotna82-pixel

This comment was marked as spam.

Technically application/x-www-form-urlencoded data can contain repeated
fields. Some OAuth RFCs allow for repeated fields, so we should support
this.

Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
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>
Permit exchanging caller-provided JWT assertions for OAuth access
tokens using RFC 7523's JWT bearer grant. Keep assertions opaque
and allow requests to omit scope so the authorization server can
apply its configured defaults.

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.

2 participants