Skip to content
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

Add a method to verify if a claim is present, regardless of its value #360

Closed
LeafHacker opened this issue Oct 15, 2019 · 4 comments
Closed
Assignees
Labels
feature request A feature has been asked for or suggested by the community
Milestone

Comments

@LeafHacker
Copy link

Describe the problem you'd like to have solved

I'd like to be able to verify that certain claims are present on a JWT, but I don't want have to limit its value.

Describe the ideal solution

A Verification method along the lines of withClaim(String name) which simply ensures the claim is present. Additionally withClaim(String name, Type type) which validates the claim is present and assignable to type would be nice.

Alternatives and current work-arounds

I don't have any work around currently, especially since the implementing class is final. Alternative names for the proposed method could be hasClaim, isPresent, requireClaim, etc, might make it clearer that the method is different to the other withClaims. Not sure if this is preferred vs sticking with a consistent name.

@lbalmaceda lbalmaceda added the feature request A feature has been asked for or suggested by the community label Dec 30, 2019
@lbalmaceda lbalmaceda added this to the v4-Next milestone Feb 12, 2020
@stale
Copy link

stale bot commented May 12, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you have not received a response for our team (apologies for the delay) and this is still a blocker, please reply with additional information or just a ping. Thank you for your contribution! 🙇‍♂️

@stale stale bot added the closed:stale Issue or PR has not seen activity recently label May 12, 2020
@lbalmaceda
Copy link
Contributor

Tracking this internally on SDK-1416

@lbalmaceda lbalmaceda removed the closed:stale Issue or PR has not seen activity recently label May 14, 2020
@stale
Copy link

stale bot commented Aug 13, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you have not received a response for our team (apologies for the delay) and this is still a blocker, please reply with additional information or just a ping. Thank you for your contribution! 🙇‍♂️

@stale stale bot added the closed:stale Issue or PR has not seen activity recently label Aug 13, 2020
@lbalmaceda lbalmaceda removed the closed:stale Issue or PR has not seen activity recently label Aug 18, 2020
@jimmyjames jimmyjames self-assigned this Sep 18, 2020
@jimmyjames
Copy link
Contributor

The ability to verify a claim's presence regardless of value has been added in 3.11.0. If there is still demand to verify a claim by presence and type, please open a new issue so we can evaluate and discuss. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request A feature has been asked for or suggested by the community
Projects
None yet
Development

No branches or pull requests

3 participants