Questions tagged [jjwt]

Use when referencing the JJWT library for the JVM and Android

The JJWT library for the JVM and Android: https://github.com/jwtk/jjwt

138 questions
4
votes
2 answers

The nimbus-jose-jwt and io.jsonwebtoken - which jjwt library to pick and why?

I am looking to implement the jjwt in my application and looking to implement jjwt, when I googled I found these two maven dependency not sure which one to pick and why ? 0.7.0
PAA
  • 1
  • 46
  • 174
  • 282
4
votes
2 answers

JSON Web Token (JWT)

I have a general question regarding JSON Web Token (JWT). If the JWT is stolen from the client (say, it was stored as a cookie or the app's database) by hacking or physical access, it can be used to send to the server which the server will think it…
ikevin8me
  • 4,253
  • 5
  • 44
  • 84
4
votes
1 answer

JJWT generated token has an invalid signature

I'm generating my JWT token using JJWT library. I generate my token as follows. I'm using dummy values as my secret key. we can assume that jwt.security.key=security-key @Value("${jwt.security.key}") private String key; …
KyelJmD
  • 4,682
  • 9
  • 54
  • 77
3
votes
2 answers

io.jsonwebtoken.SignatureException: JWT signature does not match locally computed signature

I am using spring boot and spring security with JWT on rest service. I used the code in below link: https://www.javainuse.com/spring/boot-jwt-mysql And it works fine but when we use its token for authentication and ... We face the below…
sam1364tt
  • 153
  • 1
  • 2
  • 13
3
votes
1 answer

ConfigFileApplicationListener is deprecated and can only be used as an EnvironmentPostProcessor

I am trying to create a gateway service integrated with auth service. api-gateway/pom.xml org.springframework.boot spring-boot-starter-parent
sreenivas
  • 199
  • 1
  • 3
  • 14
3
votes
1 answer

JJWT parse dont fail if SigningKey is slightly different

I try to create JWT token final String jws = Jwts.builder() .claim("rainId", rainId.toString()) .signWith(SignatureAlgorithm.HS256, TextCodec.BASE64.decode("jwtSecretKey")) .compact(); Then I try to parse…
Anton Kolosok
  • 482
  • 9
  • 24
3
votes
3 answers

JJWT / Jackson alter the ObjectMapper used

For a project I am working on, I am required to use Spring Security and JSON Webtokens as provided by the library io.jsonwebtoken (jjwt). One of the claims I am required to add to my generated token is the following entity (simplified to illustrate…
Pieter De Clercq
  • 1,951
  • 1
  • 17
  • 29
3
votes
2 answers

Decode IdToken using JJWT with RSA

My customer sends to me a JWT, I need to validate this JWT using their public key. I am using Java and JJWT framework to validate this token. I know decode this token using HS256, but using RS256 I don't know. their configurations is: Editing here…
javaTry
  • 1,085
  • 2
  • 18
  • 30
3
votes
0 answers

Spring Boot JWT filter logic

I inherited a half-written Spring Boot REST service that is using Spring Sec to implement JWT-based API authentication. Gradle security-related dependencies…
smeeb
  • 27,777
  • 57
  • 250
  • 447
3
votes
1 answer

Fetching an object of type Set from a JWT?

I am trying to fetch some data from JSON web token, using the JJWT library : https://github.com/jwtk/jjwt The method signature is like so : T get(String claimName, Class requiredType); In a claim attribute I have a Set of type String. When…
tomaytotomato
  • 3,788
  • 16
  • 64
  • 119
3
votes
1 answer

Generated with Java JJWT signature fails at jwt.io debugger

I am using the jjwt Java library for server side generation of jwt in on servlets, the code snipper below straight from the jjwt GitHub page https://github.com/jwtk/jjwt generates and prints out this…
user3383325
  • 53
  • 1
  • 5
2
votes
1 answer

In nimbus-jose-jwt, what is difference between lifespan and refreshTime?

The class DefaultJWKSetCache of nimbus-jose-jwt has two fields, lifespan and refreshTime. From Java docs - lifespan - The lifespan of the cached JWK set before it expires, negative means no expiration. refreshTime - The time after which the cached…
samshers
  • 1
  • 6
  • 37
  • 84
2
votes
1 answer

How to create a Java Key object from a base64 endoded strings for PS256 parsing with JJWT

I'm using JJWT to attempt to create and later verify JWT keys. It doesn't work when I try and convert the keys to Strings and vice versa - for storage for later use. This example work fine: KeyPair keyPair =…
sparkyspider
  • 13,195
  • 10
  • 89
  • 133
2
votes
1 answer

java.lang.AbstractMethodError occurs while trying to implement call inbound of nexmo SDK through rabbitMQ

I am trying to integrate call inbound feature using nexmo java SDK to my spring MVC project with help of rabbitMQ. But I keep on getting the exception below [WARN ] 2021-01-26 14:52:26.913…
Dhyey Vachhani
  • 269
  • 2
  • 10
2
votes
1 answer

One type argument expected for interface Function

I am following a tutorial to implement JWT authentication with spring boot and java. But in my case I want to do it with Kotlin. I am able to generate a jwt token but having issues when extracting claims from a jwt token. In this tutorial there is a…
Ruchira Nawarathna
  • 1,137
  • 17
  • 30
1
2
3
9 10