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

[SDK-3158] Null claim handling #564

Merged
merged 17 commits into from
Mar 25, 2022
Merged

[SDK-3158] Null claim handling #564

merged 17 commits into from
Mar 25, 2022

Conversation

poovamraj
Copy link
Contributor

[Currently we are merging it with predicate-claim-verifier since the changes are over it. This will be moved to v4-dev once #562 is merged]

Context

  • Previously null values were handled inconsistently
  • Null values can be added to a list but not to a map or as a value
  • Claims cannot verify for null value

Changes

  • Removed unwanted type NullClaim and instead use isNull method
  • Added isMissing method to differentiate between null claims and missing claims
  • Verification of null values using withNullClaim()
  • Handle null serialization in payload and header
  • Maps can handle null values which were previously not possible

References

Issue - Allow Null Types in Map - #511

Testing

Added Unit tests to ensure creation, verification and decoding of JWT handled null

  • This change adds test coverage
  • This change has been tested on the latest version of Java or why not

jimmyjames and others added 9 commits March 16, 2022 10:43
TODO:
- Additional tests
- Documentation
- See if there's a better way to run the validations than instanceof checks
- See if we can reuse the new method for the withClaimPresence implementation, instead of the awkwardness we do today (and potentially other areas where we can reuse)
* Use predicates for verification

* Code review changes
@poovamraj poovamraj requested a review from a team as a code owner March 24, 2022 15:54
@poovamraj poovamraj requested a review from panga March 24, 2022 16:10
@poovamraj poovamraj added this to the v4-Beta milestone Mar 24, 2022
panga
panga previously approved these changes Mar 24, 2022
@poovamraj poovamraj changed the base branch from predicate-claim-verifier to v4-dev March 25, 2022 08:49
@poovamraj poovamraj dismissed panga’s stale review March 25, 2022 08:49

The base branch was changed.

@poovamraj poovamraj changed the base branch from v4-dev to predicate-claim-verifier March 25, 2022 09:07
@poovamraj poovamraj changed the base branch from predicate-claim-verifier to v4-dev March 25, 2022 09:24
@poovamraj poovamraj merged commit e37301a into v4-dev Mar 25, 2022
@poovamraj poovamraj modified the milestones: v4-Beta, 4.0.0-beta.0 May 6, 2022
@evansims evansims deleted the null-claim-handling branch July 5, 2022 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants