From 91554cb30eefd48e85ebb744aea0be7efff13e11 Mon Sep 17 00:00:00 2001 From: Alexander Alexeev Date: Mon, 28 Nov 2016 19:59:22 +0700 Subject: permit all for /users and /messages; UserService on SimpleRememberMeService replaced by NullUserDetailsService --- .../src/main/java/com/juick/api/configuration/ApiSecurityConfig.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'juick-api/src/main/java/com/juick/api') diff --git a/juick-api/src/main/java/com/juick/api/configuration/ApiSecurityConfig.java b/juick-api/src/main/java/com/juick/api/configuration/ApiSecurityConfig.java index 8da51f5a..46e1725b 100644 --- a/juick-api/src/main/java/com/juick/api/configuration/ApiSecurityConfig.java +++ b/juick-api/src/main/java/com/juick/api/configuration/ApiSecurityConfig.java @@ -43,6 +43,7 @@ public class ApiSecurityConfig extends WebSecurityConfigurerAdapter { protected void configure(HttpSecurity http) throws Exception { http.authorizeRequests() .antMatchers(HttpMethod.OPTIONS).permitAll() + .antMatchers("/messages", "/users").permitAll() .anyRequest().hasRole("USER") .and().httpBasic().authenticationEntryPoint(getJuickAuthenticationEntryPoint()) .and().anonymous() @@ -76,7 +77,7 @@ public class ApiSecurityConfig extends WebSecurityConfigurerAdapter { @Bean public RememberMeServices rememberMeServices() throws Exception { - return new SimpleRememberMeServices(env.getProperty("auth_remember_me_key"), userDetailsService(), userService, env); + return new SimpleRememberMeServices(env.getProperty("auth_remember_me_key"), userService, env); } @Bean -- cgit v1.2.3