From 415b0ec7da02c07aad8fe85cfe0610ba9f4e5bd4 Mon Sep 17 00:00:00 2001 From: Alexander Alexeev Date: Mon, 12 Dec 2016 20:58:12 +0700 Subject: using thymeleaf spring security extension --- .../src/main/java/com/juick/www/configuration/WebSecurityConfig.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'juick-spring-www/src/main/java/com/juick/www/configuration') 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() -- cgit v1.2.3