-
Notifications
You must be signed in to change notification settings - Fork 942
Closed
Labels
bugThis points to a verified bug in the codeThis points to a verified bug in the code
Description
Checklist
- I have looked into the Readme and Examples, and have not found a suitable solution or answer.
- I have looked into the API documentation and have not found a suitable solution or answer.
- I have searched the issues and have not found a suitable solution or answer.
- I have searched the Auth0 Community forums and have not found a suitable solution or answer.
- I agree to the terms within the Auth0 Code of Conduct.
Description
When an audience with empty string pass to the payload when we try to decode it returns empty list instead of list with empty string.
Header
{
"alg": "none",
"typ": "JWT"
}Payload
{
"aud": ""
}Reproduction
val token = JWT.create().withAudience("").sign(Algorithm.none())
val decodedJWT = JWT.require(Algorithm.none()).build().verify(token)
// Also this issue expands to withAudience("") provided requirements on verification.
println(s"$token") // eyJhbGciOiJub25lIiwidHlwIjoiSldUIn0.eyJhdWQiOiIifQ.
println(s"** ${decodedJWT.getAudience}") // []
println(s"*** ${decodedJWT.getAudience.size()}") // 0Additional context
No response
java-jwt version
4.4.0
Java version
Oracle Corporation Java 11.0.16.1
Metadata
Metadata
Assignees
Labels
bugThis points to a verified bug in the codeThis points to a verified bug in the code