JOSE Validators claim mandatoriness option #17004
Labels
in: oauth2
An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)
status: duplicate
A duplicate of another issue
type: enhancement
A general enhancement
Expected Behavior
I would like to build a control in
JwtTimestampValidator
,JwtIssuerValidator
andJwtAudienceValidator
that mandatoriness of the specific JWT clause is specified. So that arequired
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.
The text was updated successfully, but these errors were encountered: