diff options
author | Alexander Alexeev | 2016-11-28 19:59:22 +0700 |
---|---|---|
committer | Vitaly Takmazov | 2016-11-28 16:11:10 +0300 |
commit | 91554cb30eefd48e85ebb744aea0be7efff13e11 (patch) | |
tree | 3ae20a13857cbffe1b0ef703e09dbf782dad0455 /juick-api/src/main/java | |
parent | 595775d273a6af92268426e9f66e39082e389aa9 (diff) |
permit all for /users and /messages;
UserService on SimpleRememberMeService replaced by NullUserDetailsService
Diffstat (limited to 'juick-api/src/main/java')
-rw-r--r-- | juick-api/src/main/java/com/juick/api/configuration/ApiSecurityConfig.java | 3 |
1 files changed, 2 insertions, 1 deletions
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 |