-
Notifications
You must be signed in to change notification settings - Fork 6k
JOSE Validators claim mandatoriness option #17004
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
Comments
Thanks for the suggestion, @FerencKemeny. I've added this to our Spring Security 7 roadmap. |
Note that |
So do you mean you would like to see I think this is more like code cleanness but backward compatibility. I did not change the original contructor signatures and their function. Let me change as you suggested. |
@jzheaux Refactored with creating |
Closing in favor of #17030 |
This commit corrects the test that checks for both nbf and exp missing. It also adds one for just exp and on for just nbf. Issue spring-projectsgh-17004 Signed-off-by: Ferenc Kemeny <[email protected]>
Closes spring-projectsgh-17004 Signed-off-by: Ferenc Kemeny <[email protected]>
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: