java-jwt icon indicating copy to clipboard operation
java-jwt copied to clipboard

Read the payload written by withPayload

Open bmaehr opened this issue 3 months ago • 2 comments

Checklist

  • [x] I have looked into the Readme and Examples, and have not found a suitable solution or answer.
  • [x] I have looked into the API documentation and have not found a suitable solution or answer.
  • [x] I have searched the issues and have not found a suitable solution or answer.
  • [x] I have searched the Auth0 Community forums and have not found a suitable solution or answer.
  • [x] I agree to the terms within the Auth0 Code of Conduct.

Describe the problem you'd like to have solved

Hello,

When buliding a JWT you can set a payload with JWT.create().withPayload(payload).

But when decoding the JWT you don't have access to this payload. You are just able to get the payload Base64 encoded.

Describe the ideal solution

Maybe give access to JWTDecoder.payloadJson. The problem is the incosistent design of the methods.

Alternatives and current workarounds

No response

Additional context

No response

bmaehr avatar Sep 02 '25 12:09 bmaehr

Hi, Can I handle this issue?

marktech0813 avatar Nov 10 '25 14:11 marktech0813

Please check PR. thanks.

marktech0813 avatar Nov 21 '25 09:11 marktech0813