Skip to content
Snippets Groups Projects
Commit ad5e7f89 authored by Cédric Willekens's avatar Cédric Willekens
Browse files

Re-enable redis sessions and make encoder and savedrequestawareauthentication...

Re-enable redis sessions and make encoder and savedrequestawareauthentication only availble during development
parent 4bf834ab
No related branches found
No related tags found
No related merge requests found
......@@ -15,8 +15,10 @@
*/
package nl.tudelft.ewi.queue;
import org.springframework.context.annotation.Profile;
import org.springframework.security.crypto.password.PasswordEncoder;
@Profile("development")
public class Encoder implements PasswordEncoder {
private static final Encoder INSTANCE = new Encoder();
......
......@@ -16,8 +16,9 @@
package nl.tudelft.ewi.queue;
import org.springframework.context.annotation.Profile;
import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;
@Profile("production")
//@EnableRedisHttpSession
@EnableRedisHttpSession
public class HttpSessionConfig {
}
......@@ -20,6 +20,7 @@ import java.io.IOException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.context.annotation.Profile;
import org.springframework.security.core.Authentication;
import org.springframework.security.web.authentication.SimpleUrlAuthenticationSuccessHandler;
import org.springframework.security.web.savedrequest.HttpSessionRequestCache;
......@@ -27,6 +28,7 @@ import org.springframework.security.web.savedrequest.RequestCache;
import org.springframework.security.web.savedrequest.SavedRequest;
import org.springframework.util.StringUtils;
@Profile("!production")
public class SavedRequestAwareAuthenticationSuccessHandler extends SimpleUrlAuthenticationSuccessHandler {
private RequestCache requestCache = new HttpSessionRequestCache();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment