aboutsummaryrefslogtreecommitdiff
path: root/juick-server
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-08-21 11:53:36 +0300
committerGravatar Vitaly Takmazov2018-08-21 11:53:36 +0300
commitd4a9a95f43e0b911b76d03150603d191d463550c (patch)
tree315289c380b7e424160066dfe0c8f18dc6fc9948 /juick-server
parent03b85ca2d8e53a13d73babd1be82ee70ac81a995 (diff)
cleanup configuration
Diffstat (limited to 'juick-server')
-rw-r--r--juick-server/src/main/java/com/juick/server/configuration/ApiSecurityConfig.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/juick-server/src/main/java/com/juick/server/configuration/ApiSecurityConfig.java b/juick-server/src/main/java/com/juick/server/configuration/ApiSecurityConfig.java
index 41689bb1..8b37ef17 100644
--- a/juick-server/src/main/java/com/juick/server/configuration/ApiSecurityConfig.java
+++ b/juick-server/src/main/java/com/juick/server/configuration/ApiSecurityConfig.java
@@ -25,12 +25,14 @@ import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.HttpMethod;
import org.springframework.http.HttpStatus;
+import org.springframework.security.authentication.AuthenticationProvider;
import org.springframework.security.authentication.dao.DaoAuthenticationProvider;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.builders.WebSecurity;
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 org.springframework.security.web.AuthenticationEntryPoint;
import org.springframework.security.web.authentication.HttpStatusEntryPoint;
import org.springframework.security.web.authentication.RememberMeServices;
@@ -81,7 +83,7 @@ public class ApiSecurityConfig extends WebSecurityConfigurerAdapter {
}
@Bean
- public DaoAuthenticationProvider authenticationProvider() {
+ public AuthenticationProvider authenticationProvider() {
DaoAuthenticationProvider authenticationProvider = new DaoAuthenticationProvider();
authenticationProvider.setUserDetailsService(userDetailsService());
@@ -90,7 +92,7 @@ public class ApiSecurityConfig extends WebSecurityConfigurerAdapter {
}
@Bean
- public JuickUserDetailsService userDetailsService() {
+ public UserDetailsService userDetailsService() {
return new JuickUserDetailsService(userService);
}