Closed
Description
`
String key = "hello";
String compactJws = Jwts.builder()
.setSubject("Joe")
.signWith(SignatureAlgorithm.HS512, key)
.compact();
String fakeCompactJws = compactJws.substring(0, compactJws.length() - 1) + "1"; // modify last the word to 1
System.out.println("real jwt: " + compactJws);
System.out.println("fake jwt: " + fakeCompactJws);
System.out.println(Jwts.parser().setSigningKey(key).parseClaimsJws(fakeCompactJws).getBody().getSubject()); // why 'joe', i'm modify a word
`
Metadata
Metadata
Assignees
Labels
No labels