aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/main/java/com
diff options
context:
space:
mode:
Diffstat (limited to 'juick-server/src/main/java/com')
-rw-r--r--juick-server/src/main/java/com/juick/service/security/SimpleRememberMeServices.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/juick-server/src/main/java/com/juick/service/security/SimpleRememberMeServices.java b/juick-server/src/main/java/com/juick/service/security/SimpleRememberMeServices.java
index 2a28866c..aef133d3 100644
--- a/juick-server/src/main/java/com/juick/service/security/SimpleRememberMeServices.java
+++ b/juick-server/src/main/java/com/juick/service/security/SimpleRememberMeServices.java
@@ -5,6 +5,8 @@ import com.juick.server.security.entities.JuickUser;
import com.juick.service.UserService;
import com.juick.util.UserUtils;
import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.core.env.Environment;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.userdetails.UserDetails;
@@ -23,6 +25,8 @@ import java.util.Optional;
* Created by aalexeev on 11/28/16.
*/
public class SimpleRememberMeServices extends AbstractRememberMeServices implements RememberMeServices {
+ private static final Logger logger = LoggerFactory.getLogger(SimpleRememberMeServices.class);
+
private final UserService userService;
public SimpleRememberMeServices(
@@ -49,7 +53,7 @@ public class SimpleRememberMeServices extends AbstractRememberMeServices impleme
HttpServletRequest request, HttpServletResponse response, Authentication successfulAuthentication) {
String username = successfulAuthentication.getName();
- logger.debug("Creating new persistent login for user " + username);
+ logger.debug("Creating new persistent login for user {}", username);
try {
int uid = userService.getUIDbyName(username);
@@ -62,7 +66,7 @@ public class SimpleRememberMeServices extends AbstractRememberMeServices impleme
setCookie(new String[]{hash}, getTokenValiditySeconds(), request, response);
} catch (Exception e) {
- logger.error("Failed to save cookies ", e);
+ logger.error("Failed to save cookies", e);
}
}