Skip to content
This repository has been archived by the owner on Apr 18, 2024. It is now read-only.

Commit

Permalink
logs: debug -> trace for the PlayCookieSessionStore
Browse files Browse the repository at this point in the history
  • Loading branch information
leleuj committed Nov 28, 2018
1 parent 9b41d0c commit b3f483b
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,19 +53,19 @@ public Object get(final PlayWebContext context, final String key) {
final Http.Session session = context.getJavaSession();
String sessionValue = session.get(keyPrefix + key);
if (sessionValue == null) {
logger.debug("get, key = {} -> null", key);
logger.trace("get, key = {} -> null", key);
return null;
} else {
byte[] inputBytes = Base64.decodeBase64(sessionValue);
final Object value = JAVA_SER_HELPER.unserializeFromBytes(uncompressBytes(dataEncrypter.decrypt(inputBytes)));
logger.debug("get, key = {} -> value = {}", key, value);
logger.trace("get, key = {} -> value = {}", key, value);
return value;
}
}

@Override
public void set(final PlayWebContext context, final String key, final Object value) {
logger.debug("set, key = {}, value = {}", key, value);
logger.trace("set, key = {}, value = {}", key, value);
Object clearedValue = value;
if (key.contentEquals(Pac4jConstants.USER_PROFILES)) {
clearedValue = clearUserProfiles(value);
Expand All @@ -76,9 +76,9 @@ public void set(final PlayWebContext context, final String key, final Object val
byte[] javaSerBytes = JAVA_SER_HELPER.serializeToBytes((Serializable) clearedValue);
String serialized = Base64.encodeBase64String(dataEncrypter.encrypt(compressBytes(javaSerBytes)));
if (serialized != null) {
logger.debug("set, key = {} -> serialized token size = {}", key, serialized.length());
logger.trace("set, key = {} -> serialized token size = {}", key, serialized.length());
} else {
logger.debug("set, key = {} -> null serialized token", key);
logger.trace("set, key = {} -> null serialized token", key);
}
session.put(keyPrefix + key, serialized);
}
Expand Down

0 comments on commit b3f483b

Please sign in to comment.