Package alpine.server.auth
Class AlpineCookie
java.lang.Object
javax.ws.rs.core.Cookie
javax.ws.rs.core.NewCookie
alpine.server.auth.AlpineCookie
- Direct Known Subclasses:
AuthorizationTokenCookie
public class AlpineCookie
extends javax.ws.rs.core.NewCookie
Alpine Cookies are secure with the HttpOnly, Secure, and Samesite flags enabled.
- Since:
- 1.5.0
-
Field Summary
Fields inherited from class javax.ws.rs.core.NewCookie
DEFAULT_MAX_AGEFields inherited from class javax.ws.rs.core.Cookie
DEFAULT_VERSION -
Constructor Summary
ConstructorsConstructorDescriptionAlpineCookie(String name, String value) Create a new instance.AlpineCookie(String name, String value, String path, String domain) Create a new instance.AlpineCookie(String name, String value, String path, String domain, int maxAge) Create a new instance.AlpineCookie(String name, String value, String path, String domain, int version, int maxAge) Create a new instance. -
Method Summary
Methods inherited from class javax.ws.rs.core.NewCookie
equals, getComment, getExpiry, getMaxAge, hashCode, isHttpOnly, isSecure, toCookie, valueOfMethods inherited from class javax.ws.rs.core.Cookie
getDomain, getName, getPath, getValue, getVersion
-
Constructor Details
-
AlpineCookie
Create a new instance.- Parameters:
name- the name of the cookie.value- the value of the cookie.path- the URI path for which the cookie is valid.domain- the host domain for which the cookie is valid.version- the versionmaxAge- the maximum age of the cookie in seconds.- Throws:
IllegalArgumentException- if name isnull.- Since:
- 1.5.0
-
AlpineCookie
Create a new instance.- Parameters:
name- the name of the cookie.value- the value of the cookie.path- the URI path for which the cookie is valid.domain- the host domain for which the cookie is valid.maxAge- the maximum age of the cookie in seconds.- Throws:
IllegalArgumentException- if name isnull.- Since:
- 1.5.0
-
AlpineCookie
Create a new instance.- Parameters:
name- the name of the cookie.value- the value of the cookie.path- the URI path for which the cookie is valid.domain- the host domain for which the cookie is valid.- Throws:
IllegalArgumentException- if name isnull.- Since:
- 1.5.0
-
AlpineCookie
Create a new instance.- Parameters:
name- the name of the cookie.value- the value of the cookie.- Throws:
IllegalArgumentException- if name isnull.- Since:
- 1.5.0
-
-
Method Details
-
toString
Convert the cookie to a string suitable for use as the value of the corresponding HTTP header.- Overrides:
toStringin classjavax.ws.rs.core.NewCookie- Returns:
- a stringified cookie.
- Since:
- 1.5.0
-