Class CookieTenantWriterConfigurationProperties

    • Field Detail

      • PREFIX

        public static final java.lang.String PREFIX
        Configuration Properties Prefix.
        See Also:
        Constant Field Values
      • DEFAULT_ENABLED

        public static final boolean DEFAULT_ENABLED
        The default enable value.
        See Also:
        Constant Field Values
      • DEFAULT_HTTPONLY

        public static final boolean DEFAULT_HTTPONLY
        The default http only value.
        See Also:
        Constant Field Values
      • DEFAULT_COOKIENAME

        public static final java.lang.String DEFAULT_COOKIENAME
        The default cookie name.
        See Also:
        Constant Field Values
      • DEFAULT_COOKIEPATH

        public static final java.lang.String DEFAULT_COOKIEPATH
        Default Cookie Path.
        See Also:
        Constant Field Values
    • Constructor Detail

      • CookieTenantWriterConfigurationProperties

        public CookieTenantWriterConfigurationProperties()
    • Method Detail

      • isEnabled

        public boolean isEnabled()
        Specified by:
        isEnabled in interface io.micronaut.core.util.Toggleable
      • setEnabled

        public void setEnabled​(boolean enabled)
        Enables CookieTenantWriter. Default value (false).
        Parameters:
        enabled - enabled flag
      • setCookiename

        public void setCookiename​(java.lang.String cookiename)
        Cookie Name. Default value ("tenantId").
        Parameters:
        cookiename - Cookie name
      • getCookieName

        @NonNull
        public java.lang.String getCookieName()
        Specified by:
        getCookieName in interface io.micronaut.http.cookie.CookieConfiguration
      • getCookieDomain

        public java.util.Optional<java.lang.String> getCookieDomain()
        Specified by:
        getCookieDomain in interface io.micronaut.http.cookie.CookieConfiguration
        Returns:
        the domain name of this Cookie
      • getCookiePath

        @Nullable
        public java.util.Optional<java.lang.String> getCookiePath()
        Specified by:
        getCookiePath in interface io.micronaut.http.cookie.CookieConfiguration
        Returns:
        The path of the cookie.
      • isCookieHttpOnly

        public java.util.Optional<java.lang.Boolean> isCookieHttpOnly()
        Specified by:
        isCookieHttpOnly in interface io.micronaut.http.cookie.CookieConfiguration
        Returns:
        Whether the Cookie can only be accessed via HTTP.
      • isCookieSecure

        public java.util.Optional<java.lang.Boolean> isCookieSecure()
        Specified by:
        isCookieSecure in interface io.micronaut.http.cookie.CookieConfiguration
        Returns:
        True if the cookie is secure
      • getCookieMaxAge

        public java.util.Optional<java.time.temporal.TemporalAmount> getCookieMaxAge()
        Specified by:
        getCookieMaxAge in interface io.micronaut.http.cookie.CookieConfiguration
        Returns:
        The max age to use for the cookie
      • setCookieDomain

        public void setCookieDomain​(@Nullable
                                    java.lang.String cookieDomain)
        Sets the domain name of this Cookie. Default value ("tenantId").
        Parameters:
        cookieDomain - the domain name of this Cookie
      • setCookiePath

        public void setCookiePath​(@Nullable
                                  java.lang.String cookiePath)
        Sets the path of the cookie. Default value ("/".
        Parameters:
        cookiePath - The path of the cookie.
      • setCookieHttpOnly

        public void setCookieHttpOnly​(boolean cookieHttpOnly)
        Whether the Cookie can only be accessed via HTTP. Default value (true.
        Parameters:
        cookieHttpOnly - Whether the Cookie can only be accessed via HTTP.
      • setCookieSecure

        public void setCookieSecure​(boolean cookieSecure)
        Sets whether the cookie is secured. Defaults to the secure status of the request.
        Parameters:
        cookieSecure - True if the cookie is secure
      • setCookieMaxAge

        public void setCookieMaxAge​(java.time.temporal.TemporalAmount cookieMaxAge)
        Sets the maximum age of the cookie.
        Parameters:
        cookieMaxAge - The maximum age of the cookie
      • getCookieSameSite

        public java.util.Optional<io.micronaut.http.cookie.SameSite> getCookieSameSite()
        Specified by:
        getCookieSameSite in interface io.micronaut.http.cookie.CookieConfiguration
      • setCookieSameSite

        public void setCookieSameSite​(io.micronaut.http.cookie.SameSite sameSite)
        Determines if this this Cookie can be sent along cross-site requests. For more information, please look here
        Parameters:
        sameSite - SameSite value