Class Session.Cookie
- java.lang.Object
- org.springframework.boot.web.servlet.server.Session.Cookie
- Enclosing class:
- Session
public static class Session.Cookie extends Object
Cookie properties.
Constructor Summary
Constructors Constructor Description Cookie()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getComment()
Return the comment for the session cookie.String
getDomain()
Return the domain for the session cookie.Boolean
getHttpOnly()
Return whether to use "HttpOnly" cookies for session cookies.Duration
getMaxAge()
Return the maximum age of the session cookie.String
getName()
Return the session cookie name.String
getPath()
Return the path of the session cookie.Boolean
getSecure()
Return whether to always mark the session cookie as secure.void
setComment(String comment)
void
setDomain(String domain)
void
setHttpOnly(Boolean httpOnly)
void
setMaxAge(Duration maxAge)
void
setName(String name)
void
setPath(String path)
void
setSecure(Boolean secure)
Constructor Detail
Cookie
public Cookie()
Method Detail
getDomain
public String getDomain()
Return the domain for the session cookie.- Returns:
- the session cookie domain
getComment
public String getComment()
Return the comment for the session cookie.- Returns:
- the session cookie comment
setComment
public void setComment(String comment)
getHttpOnly
public Boolean getHttpOnly()
Return whether to use "HttpOnly" cookies for session cookies.- Returns:
true
to use "HttpOnly" cookies for session cookies.
setHttpOnly
public void setHttpOnly(Boolean httpOnly)
getSecure
public Boolean getSecure()
Return whether to always mark the session cookie as secure.- Returns:
true
to mark the session cookie as secure even if the request that initiated the corresponding session is using plain HTTP
getMaxAge
public Duration getMaxAge()
Return the maximum age of the session cookie.- Returns:
- the maximum age of the session cookie