I have application which gives access token after authentication and I want to check if token is not expired
@JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
private String expires_in;
public boolean isNotExpired() {
return ! Instant.now().isBefore(Instant.parse(expires_in));
}
But after I run application I get errors:
JSON encoding error: Text '3600' could not be parsed at index 4; nested exception is com.fasterxml.jackson.databind.JsonMappingException: Text '3600' could not be parsed at index 4 (through reference chain: com.Auth.AuthInfo["notExpired"])
How can I fix this?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…