Class CookieService

java.lang.Object
ch.tocco.nice2.web.core.impl.servlet.CookieService

@Component public class CookieService extends Object
  • Constructor Details

  • Method Details

    • getSkipUrls

      public static Set<String> 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 response
      request - the initial request
    • setAuthSameSiteMode

      @Value("${nice2.web.cookies.auth.samesite}") public void setAuthSameSiteMode(org.springframework.boot.web.server.Cookie.SameSite authSameSiteMode)
    • setAuthSecure

      @Value("${nice2.web.cookies.auth.secure}") public void setAuthSecure(Boolean authSecure)