Skip to content

Commit

Permalink
Log levels switched to DEBUG.
Browse files Browse the repository at this point in the history
  • Loading branch information
antoniotarricone committed Jun 15, 2024
1 parent daf03f0 commit cefa1cc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ protected Uni<String> createKey(List<String> 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());
Expand All @@ -113,7 +113,7 @@ protected Uni<String> retrieveKey(List<String> keyOps) {
Log.trace("Retrieve key");

if (keyIdCache.isValid(0)) {
Log.trace("Returned cached kid");
Log.debug("Returned cached kid");
return UniGenerator.item(keyIdCache.getKid());
}

Expand Down

0 comments on commit cefa1cc

Please sign in to comment.