https://github.com/cassiomolin/jersey-jwt/blob/e0081152298ea18cb4d17ad53c3a0d89accbda8e/src/main/java/com/cassiomolin/example/security/api/resource/AuthenticationResource.java#L71 The server is giving type cast error. How is your code able to perform the same action. Please help