Class AuthCookie

java.lang.Object
ch.tocco.nice2.web.core.api.servlet.AbstractNiceCookie
ch.tocco.nice2.web.core.api.servlet.AuthCookie

public class AuthCookie extends AbstractNiceCookie
Implements the nice_auth cookie.
  • Field Details

  • Constructor Details

    • AuthCookie

      public AuthCookie(@Nullable @Nullable String content)
  • Method Details

    • getSpecificTokens

      protected List<String> getSpecificTokens(jakarta.servlet.http.HttpServletRequest request)
      Specified by:
      getSpecificTokens in class AbstractNiceCookie
    • getName

      protected String getName()
      Specified by:
      getName in class AbstractNiceCookie
    • shouldBeSecured

      protected boolean shouldBeSecured(jakarta.servlet.http.HttpServletRequest request)
      Some of our automated tests run on a headless browser without an https connection. Therefore it must be possible to use Tocco without https. On production, https is ensured through configuration of the server setup. We can be sure that the cookie is always safe on production.
      Specified by:
      shouldBeSecured in class AbstractNiceCookie
      Parameters:
      request - the current request to the backend