diff --git a/src/main/java/it/pagopa/swclient/mil/auth/bean/KeyIdCache.java b/src/main/java/it/pagopa/swclient/mil/auth/bean/KeyIdCache.java index 904d0c16..454f025c 100644 --- a/src/main/java/it/pagopa/swclient/mil/auth/bean/KeyIdCache.java +++ b/src/main/java/it/pagopa/swclient/mil/auth/bean/KeyIdCache.java @@ -52,18 +52,18 @@ public class KeyIdCache { */ public boolean isValid(long remainingLife) { if (kid == null) { - Log.trace("kid is null"); + Log.debug("kid is null"); return false; } long now = Instant.now().getEpochSecond(); if ((exp - now) < remainingLife) { - Log.trace("Key is expired"); + Log.debug("Key is expired"); return false; } if ((now - storedAt) > expireAfterWrite) { - Log.trace("Cache is expired"); + Log.debug("Cache is expired"); return false; } diff --git a/src/main/java/it/pagopa/swclient/mil/auth/service/KeyManCapabilities.java b/src/main/java/it/pagopa/swclient/mil/auth/service/KeyManCapabilities.java index 281fe696..5bea72a3 100644 --- a/src/main/java/it/pagopa/swclient/mil/auth/service/KeyManCapabilities.java +++ b/src/main/java/it/pagopa/swclient/mil/auth/service/KeyManCapabilities.java @@ -95,7 +95,7 @@ protected Uni createKey(List keyOps) { .setKty(JsonWebKeyType.RSA)) .map(keyBundle -> { String kid = keyBundle.getKey().getKid(); - Log.trace("Cache the key ID"); + Log.debug("Cache the key ID"); keyIdCache.setKid(kid) .setExp(keyBundle.getAttributes().getExp()) .setStoredAt(Instant.now().getEpochSecond()); @@ -113,7 +113,7 @@ protected Uni retrieveKey(List keyOps) { Log.trace("Retrieve key"); if (keyIdCache.isValid(0)) { - Log.trace("Returned cached kid"); + Log.debug("Returned cached kid"); return UniGenerator.item(keyIdCache.getKid()); }