Class CookieService
java.lang.Object
ch.tocco.nice2.web.core.impl.servlet.CookieService
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionCookieService
(List<InformationCookieContribution> informationContributions, WidgetDomainHelperService widgetDomainHelperService) -
Method Summary
Modifier and TypeMethodDescription@Nullable String
getAuthCookieValue
(jakarta.servlet.http.HttpServletRequest request) void
removeCookies
(jakarta.servlet.http.HttpServletResponse response, jakarta.servlet.http.HttpServletRequest request) Removes all nice cookies from the current session by setting the maxAge to 0 and the value to an empty string.void
setAuthSameSiteMode
(org.springframework.boot.web.server.Cookie.SameSite authSameSiteMode) void
setAuthSecure
(Boolean authSecure) void
updateCookies
(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, CookieService.CookieConfig cookieConfig)
-
Constructor Details
-
CookieService
public CookieService(List<InformationCookieContribution> informationContributions, WidgetDomainHelperService widgetDomainHelperService)
-
-
Method Details
-
getSkipUrls
-
getAuthCookieValue
@Nullable public @Nullable String getAuthCookieValue(jakarta.servlet.http.HttpServletRequest request) -
updateCookies
public void updateCookies(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, CookieService.CookieConfig cookieConfig) -
removeCookies
public void removeCookies(jakarta.servlet.http.HttpServletResponse response, jakarta.servlet.http.HttpServletRequest request) Removes all nice cookies from the current session by setting the maxAge to 0 and the value to an empty string.- Parameters:
response
- the responserequest
- the initial request
-
setAuthSameSiteMode
@Value("${nice2.web.cookies.auth.samesite}") public void setAuthSameSiteMode(org.springframework.boot.web.server.Cookie.SameSite authSameSiteMode) -
setAuthSecure
-