Module io.inverno.mod.http.base
Package io.inverno.mod.http.base.header
Interface SetCookie.Configurator
- Enclosing interface:
SetCookie
public static interface SetCookie.Configurator
A configurator used to configure a set-cookie.
- Since:
- 1.0
- Author:
- Jeremy Kuhn
-
Method Summary
Modifier and TypeMethodDescriptionSets the cookie domain attribute.expires
(ZonedDateTime expires) Sets the cookie expires attribute.httpOnly
(boolean httpOnly) Sets the cookie http only flag attribute.maxAge
(int maxAge) Sets the cookie max age attribute in seconds.Sets the cookie name.Sets the cookie path attribute.sameSite
(Headers.SetCookie.SameSitePolicy sameSite) Sets the cookie same site flag attribute.secure
(boolean secure) Sets the cookie secure flag attribute.Sets the cookie value.
-
Method Details
-
name
Sets the cookie name.
- Parameters:
name
- a cookie name- Returns:
- the configurator
-
value
Sets the cookie value.
- Parameters:
value
- a cookie value- Returns:
- the configurator
-
expires
Sets the cookie expires attribute.
Note that the resulting date time will be serialized at GMT time zone.
- Parameters:
expires
- the expires date time- Returns:
- the configurator
-
maxAge
Sets the cookie max age attribute in seconds.
- Parameters:
maxAge
- the cookie max age- Returns:
- the configurator
-
domain
Sets the cookie domain attribute.
- Parameters:
domain
- the cookie domain- Returns:
- the configurator
-
path
Sets the cookie path attribute.
- Parameters:
path
- the cookie path- Returns:
- the configurator
-
secure
Sets the cookie secure flag attribute.
- Parameters:
secure
- the cookie secure flag- Returns:
- the configurator
-
httpOnly
Sets the cookie http only flag attribute.
- Parameters:
httpOnly
- the cookie http only flag- Returns:
- the configurator
-
sameSite
Sets the cookie same site flag attribute.
- Parameters:
sameSite
- a same site policy- Returns:
- the configurator
-