diff --git a/starter-kit/src/main/java/it/spid/cie/oidc/helper/JWTHelper.java b/starter-kit/src/main/java/it/spid/cie/oidc/helper/JWTHelper.java index c75883f..e84d54a 100644 --- a/starter-kit/src/main/java/it/spid/cie/oidc/helper/JWTHelper.java +++ b/starter-kit/src/main/java/it/spid/cie/oidc/helper/JWTHelper.java @@ -21,8 +21,7 @@ import java.security.PrivateKey; import java.security.interfaces.RSAPublicKey; import java.text.ParseException; -import java.time.LocalDateTime; -import java.time.ZoneOffset; +import java.time.Instant; import org.json.JSONArray; import org.json.JSONObject; @@ -165,7 +164,7 @@ public static JWK getFirstJWK(JWKSet jwkSet) throws OIDCException { * @return current UTC date time as epoch seconds */ public static long getIssuedAt() { - return LocalDateTime.now().toEpochSecond(ZoneOffset.UTC); + return Instant.now().getEpochSecond(); } /**