diff options
Diffstat (limited to 'src/main/java/com/juick/config/SecurityConfig.java')
-rw-r--r-- | src/main/java/com/juick/config/SecurityConfig.java | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/main/java/com/juick/config/SecurityConfig.java b/src/main/java/com/juick/config/SecurityConfig.java index b16dc755..ad24445b 100644 --- a/src/main/java/com/juick/config/SecurityConfig.java +++ b/src/main/java/com/juick/config/SecurityConfig.java @@ -62,7 +62,7 @@ public class SecurityConfig { private static final String COOKIE_NAME = "juick-remember-me"; @Bean - public UserDetailsService userDetailsService() { + UserDetailsService userDetailsService() { return new JuickUserDetailsService(userService); } @@ -85,12 +85,12 @@ public class SecurityConfig { private SignatureManager signatureManager; @Bean - public HashParamAuthenticationFilter apiAuthenticationFilter() { + HashParamAuthenticationFilter apiAuthenticationFilter() { return new HashParamAuthenticationFilter(userService, null); } @Bean - public AuthenticationEntryPoint juickAuthenticationEntryPoint() { + AuthenticationEntryPoint juickAuthenticationEntryPoint() { var entryPoint = new BasicAuthenticationEntryPoint(); entryPoint.setRealmName("Juick"); return entryPoint; @@ -102,12 +102,12 @@ public class SecurityConfig { private String webDomain; @Bean - public HashParamAuthenticationFilter wwwAuthenticationFilter() { + HashParamAuthenticationFilter wwwAuthenticationFilter() { return new HashParamAuthenticationFilter(userService, hashCookieServices()); } @Bean - public RememberMeServices hashCookieServices() { + RememberMeServices hashCookieServices() { TokenBasedRememberMeServices services = new TokenBasedRememberMeServices( rememberMeKey, userDetailsService()); @@ -121,7 +121,7 @@ public class SecurityConfig { @Bean @Order(1) - public SecurityFilterChain apiChain(HttpSecurity http) throws Exception { + SecurityFilterChain apiChain(HttpSecurity http) throws Exception { http.securityMatcher("/api/**") .addFilterBefore(apiAuthenticationFilter(), BasicAuthenticationFilter.class) .addFilterBefore(new HTTPSignatureAuthenticationFilter(signatureManager, userService), @@ -155,14 +155,14 @@ public class SecurityConfig { } @Bean - public AuthenticationSuccessHandler successHandler() { + AuthenticationSuccessHandler successHandler() { SimpleUrlAuthenticationSuccessHandler handler = new SimpleUrlAuthenticationSuccessHandler(); handler.setUseReferer(true); return handler; } @Bean - public SecurityFilterChain wwwChain(HttpSecurity http) throws Exception { + SecurityFilterChain wwwChain(HttpSecurity http) throws Exception { http.addFilterBefore(wwwAuthenticationFilter(), BasicAuthenticationFilter.class) .authorizeHttpRequests(authorize -> authorize .requestMatchers("/settings", "/pm/**", "/**/bl", "/_twitter", "/post", |