diff options
author | Alexander Alexeev | 2016-12-12 20:58:12 +0700 |
---|---|---|
committer | Vitaly Takmazov | 2016-12-12 22:49:47 +0300 |
commit | 415b0ec7da02c07aad8fe85cfe0610ba9f4e5bd4 (patch) | |
tree | b7de01f7925a65a6b569da5e8036552cc31a470c /juick-spring-www/src/main/java/com | |
parent | 59fd361edab0f28991e9ded0c87ed70b7011001c (diff) |
using thymeleaf spring security extension
Diffstat (limited to 'juick-spring-www/src/main/java/com')
-rw-r--r-- | juick-spring-www/src/main/java/com/juick/www/configuration/WebSecurityConfig.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/juick-spring-www/src/main/java/com/juick/www/configuration/WebSecurityConfig.java b/juick-spring-www/src/main/java/com/juick/www/configuration/WebSecurityConfig.java index d10f2532..692cf8cc 100644 --- a/juick-spring-www/src/main/java/com/juick/www/configuration/WebSecurityConfig.java +++ b/juick-spring-www/src/main/java/com/juick/www/configuration/WebSecurityConfig.java @@ -1,6 +1,6 @@ package com.juick.www.configuration; -import com.juick.entity.AnonymUser; +import com.juick.server.security.entities.JuickUser; import com.juick.service.UserService; import com.juick.service.security.JuickUserDetailsService; import org.springframework.context.annotation.Bean; @@ -9,7 +9,6 @@ import org.springframework.core.env.Environment; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; -import org.springframework.security.config.http.SessionCreationPolicy; import org.springframework.security.core.userdetails.UserDetailsService; import javax.annotation.Resource; @@ -38,7 +37,7 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter { .antMatchers("/settings", "/pm/**").authenticated() .anyRequest().permitAll() .and() - .anonymous().principal(AnonymUser.INSTANCE) + .anonymous().principal(JuickUser.ANONYM_USER).authorities(JuickUser.ANONYM_AUTHORITY) .and() .sessionManagement().invalidSessionUrl("/") .and() |