Description
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.