Package io.micronaut.http.cookie
Interface CookieConfiguration
-
public interface CookieConfiguration
An interface representing the configuration of a Cookie.- Since:
- 1.1.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description java.util.Optional<java.lang.String>
getCookieDomain()
Gets the domain name of this Cookie.java.util.Optional<java.time.temporal.TemporalAmount>
getCookieMaxAge()
java.lang.String
getCookieName()
java.util.Optional<java.lang.String>
getCookiePath()
The path of the cookie.default java.util.Optional<SameSite>
getCookieSameSite()
java.util.Optional<java.lang.Boolean>
isCookieHttpOnly()
Checks to see if thisCookie
can only be accessed via HTTP.java.util.Optional<java.lang.Boolean>
isCookieSecure()
-
-
-
Method Detail
-
getCookieName
@NonNull java.lang.String getCookieName()
- Returns:
- The name of the cookie
-
getCookieDomain
java.util.Optional<java.lang.String> getCookieDomain()
Gets the domain name of this Cookie.- Returns:
- the domain name of this Cookie
-
getCookiePath
java.util.Optional<java.lang.String> getCookiePath()
The path of the cookie. The cookie is visible to all paths below the request path on the server.- Returns:
- The cookie path
-
isCookieHttpOnly
java.util.Optional<java.lang.Boolean> isCookieHttpOnly()
Checks to see if thisCookie
can only be accessed via HTTP.- Returns:
- True if the cookie is HTTP only
-
isCookieSecure
java.util.Optional<java.lang.Boolean> isCookieSecure()
- Returns:
- True if the cookie is secure
-
getCookieMaxAge
java.util.Optional<java.time.temporal.TemporalAmount> getCookieMaxAge()
- Returns:
- The max age to use for the cookie
-
getCookieSameSite
default java.util.Optional<SameSite> getCookieSameSite()
- Returns:
- return the SameSite to use for the cookie.
-
-