-
Notifications
You must be signed in to change notification settings - Fork 927
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
JWTCreator for basic types #282
Conversation
This is one of the ideas we proposed back when all this discussion started. I really like what you came up with since it's not exposing any external dependencies in the public API 🎉 Unfortunately, I won't be able to dedicate time to this repo for at least 2 more weeks. I'll come back later |
Our use-case is that we are currently migrating to Auth0 from Keycloak and would like to use this library for validation of tokens. So then it is also very convenient to use this library for creating mock tokens in our testing libraries as well - which requires a few deeper structures in the JWT. We are running both providers in parallel so that migration can be done service per service. |
Any hope for getting this reviewed in 2018? |
See also #278 |
508d243
to
3758bb7
Compare
@lbalmaceda bump. I've added code coverage, the build now passes the codecov quality checks. Null keys and values in maps are disallowed, but null items in lists (and arrays) are allowed - fair? If this gets merged, it would let us remove a test dependency (your competitor's library!) from our projects. |
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! 🙇♂️ |
Was any of the alternative PRs merged? If not then do not close. |
Hi @skjolber. Apologies for the delay here! We're planning to review this soon. If we happen to request changes, will you be able to address them? |
@lbalmaceda yes |
} | ||
|
||
private static boolean validateClaim(List<?> list) { | ||
// accept null values in list |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why would we want to accept null values in a list?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The corresponding withArrayClaim(..) does now, so basically it is just the same behaviour.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But are null values so bad? Could leave it up to the caller for value of Map as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checking again, it makes sense the way you did it since you're keeping the behavior of the current withArrayClaim
implementation that accepts null, and you're not accepting nulls for maps. Let's keep it that way for now.
06cfddd
to
f85c6e1
Compare
} | ||
|
||
private static boolean validateClaim(List<?> list) { | ||
// accept null values in list |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checking again, it makes sense the way you did it since you're keeping the behavior of the current withArrayClaim
implementation that accepts null, and you're not accepting nulls for maps. Let's keep it that way for now.
Support for creating tokens using Maps / Lists which must drill down to the base types Boolean, Integer, Long, Double, String and Date.