From 0c4b148e0332fa6e9318a0d2333d1593cda8038d Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 31 Jan 2020 12:54:28 +0300 Subject: security: using standard NullRememberMeServices for API configuration --- src/main/java/com/juick/server/configuration/SecurityConfig.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/main/java/com/juick/server/configuration') diff --git a/src/main/java/com/juick/server/configuration/SecurityConfig.java b/src/main/java/com/juick/server/configuration/SecurityConfig.java index dacb8a1c..2713cc56 100644 --- a/src/main/java/com/juick/server/configuration/SecurityConfig.java +++ b/src/main/java/com/juick/server/configuration/SecurityConfig.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2019, Juick + * Copyright (C) 2008-2020, Juick * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -22,7 +22,6 @@ import com.juick.service.UserService; import com.juick.service.security.HTTPSignatureAuthenticationFilter; import com.juick.service.security.HashParamAuthenticationFilter; import com.juick.service.security.JuickUserDetailsService; -import com.juick.service.security.deprecated.RequestParamHashRememberMeServices; import com.juick.service.security.entities.JuickUser; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.annotation.Value; @@ -37,6 +36,7 @@ import org.springframework.security.config.annotation.web.configuration.WebSecur 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.NullRememberMeServices; import org.springframework.security.web.authentication.RememberMeServices; import org.springframework.security.web.authentication.rememberme.TokenBasedRememberMeServices; import org.springframework.security.web.authentication.www.BasicAuthenticationEntryPoint; @@ -100,8 +100,8 @@ public class SecurityConfig { super(true); } @Bean - RememberMeServices apiTokenServices(){ - return new RequestParamHashRememberMeServices(rememberMeKey, userService); + RememberMeServices apiTokenServices() { + return new NullRememberMeServices(); } @Bean public HashParamAuthenticationFilter apiAuthenticationFilter() { -- cgit v1.2.3