public abstract class AbstractCookieConfiguration
extends java.lang.Object
implements io.micronaut.http.cookie.CookieConfiguration
CookieConfiguration
implementations.Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
cookieDomain |
protected java.lang.Boolean |
cookieHttpOnly |
protected java.time.Duration |
cookieMaxAge |
protected java.lang.String |
cookieName |
protected java.lang.String |
cookiePath |
protected java.lang.Boolean |
cookieSecure |
Constructor and Description |
---|
AbstractCookieConfiguration() |
Modifier and Type | Method and Description |
---|---|
abstract java.lang.String |
defaultCookieName() |
java.util.Optional<java.lang.String> |
getCookieDomain() |
java.util.Optional<java.time.temporal.TemporalAmount> |
getCookieMaxAge() |
java.lang.String |
getCookieName() |
java.util.Optional<java.lang.String> |
getCookiePath() |
java.util.Optional<java.lang.Boolean> |
isCookieHttpOnly() |
java.util.Optional<java.lang.Boolean> |
isCookieSecure() |
void |
setCookieDomain(java.lang.String cookieDomain)
Sets the domain name of this Cookie.
|
void |
setCookieHttpOnly(java.lang.Boolean cookieHttpOnly)
Whether the Cookie can only be accessed via HTTP.
|
void |
setCookieMaxAge(java.time.Duration cookieMaxAge)
Sets the maximum age of the cookie.
|
void |
setCookieName(java.lang.String cookieName)
Cookie Name.
|
void |
setCookiePath(java.lang.String cookiePath)
Sets the path of the cookie.
|
void |
setCookieSecure(java.lang.Boolean cookieSecure)
Sets whether the cookie is secured.
|
protected java.lang.String cookieDomain
protected java.lang.Boolean cookieSecure
protected java.lang.String cookiePath
protected java.lang.Boolean cookieHttpOnly
protected java.time.Duration cookieMaxAge
protected java.lang.String cookieName
public java.util.Optional<java.lang.String> getCookieDomain()
getCookieDomain
in interface io.micronaut.http.cookie.CookieConfiguration
public void setCookieDomain(@Nullable java.lang.String cookieDomain)
cookieDomain
- the domain name of this Cookiepublic java.util.Optional<java.lang.Boolean> isCookieSecure()
isCookieSecure
in interface io.micronaut.http.cookie.CookieConfiguration
public void setCookieSecure(java.lang.Boolean cookieSecure)
cookieSecure
- True if the cookie is secure@NonNull public java.lang.String getCookieName()
getCookieName
in interface io.micronaut.http.cookie.CookieConfiguration
public void setCookieName(@NonNull java.lang.String cookieName)
cookieName
- Cookie namepublic abstract java.lang.String defaultCookieName()
public java.util.Optional<java.lang.String> getCookiePath()
getCookiePath
in interface io.micronaut.http.cookie.CookieConfiguration
public void setCookiePath(@Nullable java.lang.String cookiePath)
cookiePath
- The path of the cookie.public java.util.Optional<java.lang.Boolean> isCookieHttpOnly()
isCookieHttpOnly
in interface io.micronaut.http.cookie.CookieConfiguration
public void setCookieHttpOnly(java.lang.Boolean cookieHttpOnly)
cookieHttpOnly
- Whether the Cookie can only be accessed via HTTPpublic java.util.Optional<java.time.temporal.TemporalAmount> getCookieMaxAge()
getCookieMaxAge
in interface io.micronaut.http.cookie.CookieConfiguration
public void setCookieMaxAge(java.time.Duration cookieMaxAge)
cookieMaxAge
- The maximum age of the cookie