Skip to content

Enforce that Access tokens only are accepted in JwtAccessTokenValidator#3294

Open
coheigea wants to merge 1 commit into
mainfrom
coheigea/JwtAccessTokenValidator
Open

Enforce that Access tokens only are accepted in JwtAccessTokenValidator#3294
coheigea wants to merge 1 commit into
mainfrom
coheigea/JwtAccessTokenValidator

Conversation

@coheigea

@coheigea coheigea commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

No description provided.


private void validateTokenType(JwtToken jwt) {
Object tokenType = jwt.getJwsHeader(JoseConstants.HEADER_TYPE);
if (tokenType != null && !JoseConstants.TYPE_AT_JWT.equals(tokenType.toString())) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am wondering if token type has to be present all the time? (== required) Or it is optional?

Suggested change
if (tokenType != null && !JoseConstants.TYPE_AT_JWT.equals(tokenType.toString())) {
if (tokenType == null || !JoseConstants.TYPE_AT_JWT.equals(tokenType.toString())) {

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.

2 participants