diff --git a/chatto/src/main/java/org/ros/chatto/logged/LoggedUser.java b/chatto/src/main/java/org/ros/chatto/logged/LoggedUser.java index 6e31759..e3e22f6 100644 --- a/chatto/src/main/java/org/ros/chatto/logged/LoggedUser.java +++ b/chatto/src/main/java/org/ros/chatto/logged/LoggedUser.java @@ -26,7 +26,7 @@ import lombok.Setter; @Setter public class LoggedUser implements HttpSessionBindingListener { - private String username; + private final String username; private UserService userService; private UserTokenService userTokenService; @@ -37,6 +37,7 @@ public class LoggedUser implements HttpSessionBindingListener { } public LoggedUser() { + username = null; } @Override diff --git a/chatto/src/main/java/org/ros/chatto/security/TokenAuthenticationFilter.java b/chatto/src/main/java/org/ros/chatto/security/TokenAuthenticationFilter.java index 1276b00..2e9e867 100644 --- a/chatto/src/main/java/org/ros/chatto/security/TokenAuthenticationFilter.java +++ b/chatto/src/main/java/org/ros/chatto/security/TokenAuthenticationFilter.java @@ -28,9 +28,6 @@ import org.springframework.web.filter.GenericFilterBean; @Component public class TokenAuthenticationFilter extends GenericFilterBean { - @Autowired - private TokenRepository tokenRepository; - @Autowired private UserTokenService userTokenService; diff --git a/chatto/src/main/resources/application.properties b/chatto/src/main/resources/application.properties index 24bf0ae..64e4e4c 100644 --- a/chatto/src/main/resources/application.properties +++ b/chatto/src/main/resources/application.properties @@ -24,4 +24,6 @@ spring.jackson.serialization.write-dates-as-timestamps=false #spring.cache.type=ehcache3 spring.cache.jcache.config=classpath:ehcache.xml logging.level.org.springframework.cache = DEBUG -#test.bindAddress=192.168.1.106 \ No newline at end of file +#test.bindAddress=192.168.1.106 + +chatto.token.timeout-duration=10_000 \ No newline at end of file