Skip to content

JOSE Validators claim mandatoriness option #17004

Closed
@FerencKemeny

Description

@FerencKemeny

Expected Behavior

I would like to build a control in JwtTimestampValidator, JwtIssuerValidator and JwtAudienceValidator that mandatoriness of the specific JWT clause is specified. So that a required parameter can specify the same way like it is done in JwtIssuedAtValidator.

Current Behavior

The above mentioned validators are simply falling through with successful check when the given clause is missing form JWT. This may be a misleading behavior because validator is created for a reason. However it is understandable the claims are optional by the specification - in general.

Context

I would like to create the alternative that the implementor could control if the fields must be mandatory. Currently this could be achieved by adding multiple validators. It is more elegant to specify if the given validator requires the claim and make the validation fail if the claim is missing. So this way more strict and rigorous control could be built.

Metadata

Metadata

Assignees

Labels

in: oauth2An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)status: duplicateA duplicate of another issuetype: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions