Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid duplicate access token parsing #19

Merged
merged 2 commits into from
Jan 21, 2025
Merged

Conversation

josephdecock
Copy link
Member

@josephdecock josephdecock commented Jan 20, 2025

There is no need to parse the access token in the DPoPJwtBearerEvents, since the handler already parses and makes the claims available in the context. By relying on those claims, we improve both performance (no allocation of an extra parser, no duplication of parsing work) and functionality (claims from a JWE are available).

This PR is based on @jpda's work using the claims in the context. I go a little further by just not parsing at all. The reason to create a new PR is to rebase the changes onto main, where CI pipeline updates have been merged that are needed for the build.

jpda and others added 2 commits January 20, 2025 21:21
There is no need to parse the access token in the DPoPJwtBearerEvents, since the handler already parses and makes the claims available in the context.
@josephdecock josephdecock merged commit ae69e27 into main Jan 21, 2025
3 checks passed
@josephdecock josephdecock deleted the jmdc/avoid-duplicate-parse branch January 21, 2025 10:10
@josephdecock josephdecock linked an issue Jan 21, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use principal claims if the AT claims are unavailable
3 participants