I Java Spring Boot App, I Just Update Maven Libraries: (jjwt-api (0.12.6)) from (jjwt-api (0.11.0))
And This My Old Code For Claims:
import io.jsonwebtoken.Jwts;
Claims claims = Jwts
.parserBuilder() // Initializes JWT Parser Builder
.setSigningKey(encryptionKey()) // Sets The Encryption Key For Parsing
.build() // Builds The JWT Parser
.parseClaimsJws(token) // Parses The Token To Retrieve Claims
.getBody(); // Retrieves The Claims Body
First Error "Cannot resolve method 'parserBuilder' in 'Jwts'"; If Fix It By Replace parserBuilder() With parser()
After Changed It's Show Notifications:
How Can I Fix This?
The new syntax would be:
Jwts.parser()
.verifyWith(encryptionKey())
.build()
.parseSignedClaims(jwt)
.getPayload();