Interface ResponseCookies
public interface ResponseCookies
A builder of response cookies.
- Since:
- 2.1.0
-
Method Summary
Modifier and TypeMethodDescriptiondefault ResponseCookiesadd(StandardResponseCookie cookie) Adds a standard, plain-text cookie to the response.add(StandardResponseCookie cookie, ValueTransformation valueTransformation) Adds a standard cookie to the response.addEncrypted(ResponseCookie cookie) Adds a cookie to the response, applying theValueTransformation.ENCRYPTtransformation to its value.addSigned(ResponseCookie cookie) Adds a cookie to the response, applying theValueTransformation.SIGNtransformation to its value.default ResponseCookiesTell the client to remove the cookie with the given name (on the domain of the request).default ResponseCookiesTell the client to remove the cookie with the given name and path (on the domain of the request).Tell the client to remove the cookie with the given name and path on a certain domain.
-
Method Details
-
add
Adds a standard, plain-text cookie to the response.To sign or encrypt the value of the cookie, use the
add(StandardResponseCookie, ValueTransformation)method instead.- Parameters:
cookie- to add to the response- Returns:
- this
-
add
Adds a standard cookie to the response.- Parameters:
cookie- to add to the responsevalueTransformation- transformation to apply to the cookie value- Returns:
- this
-
addEncrypted
Adds a cookie to the response, applying theValueTransformation.ENCRYPTtransformation to its value.- Parameters:
cookie- to add to the response after encrypting its value- Returns:
- this
-
addSigned
Adds a cookie to the response, applying theValueTransformation.SIGNtransformation to its value.- Parameters:
cookie- to add to the response after signing its value- Returns:
- this
-
remove
Tell the client to remove the cookie with the given name (on the domain of the request).The path of the expired cookie sent to the client is set to "/". Use
remove(String, String)to control which path the cookie should have.- Parameters:
name- of cookie to be removed- Returns:
- this
-
remove
Tell the client to remove the cookie with the given name and path (on the domain of the request).- Parameters:
name- of cookie to be removedpath- of the cookie- Returns:
- this
-
remove
Tell the client to remove the cookie with the given name and path on a certain domain.- Parameters:
name- of cookie to be removedpath- of the cookiedomain- domain the cookie was set on (null means the the domain of the request should be used)- Returns:
- this
- Since:
- 4.2.0
-