I got a User class. And this class obviously has fields.
public class User {
private String username;
private String password;
private long exp;
//other fields
public long getExpiration() {return exp;}
//other setters/getters
}
I'm using java-jwt library from Auth0 team for signing and verifying tokens.
Name of the field exp exactly matches verifyExpiration() method from java-jwt library.
But everytime when I'm using JWTVerifier(secret).sign(jwtmap), where jwtmap is Map< String,User > it's serialize my exp field with a name expiration.
So it's not working as it's supposed to be thorugh JWTVerifier(secret).verify(token) stage. Because .verify(token) expects field to be named as "exp"