From a8f328cf56a15c134424c4e3e752527b55b9f794 Mon Sep 17 00:00:00 2001 From: Mauro Mugnaini Date: Mon, 29 Jun 2020 16:43:16 +0200 Subject: [PATCH] "exp" field was wrongly returned as string instead of Long --- src/main/java/org/gcube/oidc/rest/JWTToken.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/gcube/oidc/rest/JWTToken.java b/src/main/java/org/gcube/oidc/rest/JWTToken.java index 4e1fe84..9d6dde8 100644 --- a/src/main/java/org/gcube/oidc/rest/JWTToken.java +++ b/src/main/java/org/gcube/oidc/rest/JWTToken.java @@ -75,12 +75,12 @@ public class JWTToken implements Serializable { return payload; } - public String getExp() { - return (String) getPayload().get("exp"); + public Long getExp() { + return (Long) getPayload().get("exp"); } public Date getExpAsDate() { - return new Date(Long.getLong(getExp()) * 1000); + return new Date(getExp() * 1000); } public Calendar getExpAsCalendar() {