-
Notifications
You must be signed in to change notification settings - Fork 948
Closed
Labels
closed:staleIssue or PR has not seen activity recentlyIssue or PR has not seen activity recently
Description
I've been tooling around with the library (instead of handling JWT tokens myself).
I'd like to be able to access the claims tree directly or be able to call DecodedJWT.getClaims().toJson() that returns either a JsonNode tree or an ObjectNode tree.
I see that the claims are stored internally as JsonNodes, but is there anyway for me to access the tree as JSON objects?
Right now I have to call getClaims().toString() and use a mapper to convert them to a JsonNode object.
My current code:
ObjectMapper mapper = new ObjectMapper();
JsonNode nodeProfile = mapper.readTree(new String(Base64.getDecoder().decode(jwtProfile.getPayload())));
JsonNode nodeToken = mapper.readTree(new String(Base64.getDecoder().decode(jwtToken.getPayload())));
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
closed:staleIssue or PR has not seen activity recentlyIssue or PR has not seen activity recently