From ab87188de28ae266aebf03fb429880cf293c6ee9 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 9 Feb 2024 17:12:21 +0300 Subject: API: accept authorization cookie --- src/main/java/com/juick/config/SecurityConfig.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/main/java/com/juick') diff --git a/src/main/java/com/juick/config/SecurityConfig.java b/src/main/java/com/juick/config/SecurityConfig.java index 030cdcc2..a7007648 100644 --- a/src/main/java/com/juick/config/SecurityConfig.java +++ b/src/main/java/com/juick/config/SecurityConfig.java @@ -223,6 +223,9 @@ public class SecurityConfig { .exceptionHandling(exceptionHandling -> exceptionHandling .authenticationEntryPoint(apiAuthenticationEntryPoint())) .csrf(AbstractHttpConfigurer::disable) + .rememberMe(rememberMe -> rememberMe + .rememberMeCookieDomain(webDomain).key(rememberMeKey) + .rememberMeServices(hashCookieServices())) .headers(headers -> headers.defaultsDisabled().cacheControl(withDefaults())); return http.build(); } -- cgit v1.2.3