JwtParser parser = Jwts.parserBuilder() .setSigningKey(secret) .build(); Claims claims=parser.parseClaimsJws(token).getBody();