Package alpine.auth
Class AlpineCookie
- java.lang.Object
-
- javax.ws.rs.core.Cookie
-
- javax.ws.rs.core.NewCookie
-
- alpine.auth.AlpineCookie
-
- Direct Known Subclasses:
AuthorizationTokenCookie
public class AlpineCookie extends javax.ws.rs.core.NewCookieAlpine Cookies are secure with the HttpOnly, Secure, and Samesite flags enabled.- Since:
- 1.5.0
-
-
Constructor Summary
Constructors Constructor Description AlpineCookie(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringtoString()Convert the cookie to a string suitable for use as the value of the corresponding HTTP header.-
Methods inherited from class javax.ws.rs.core.NewCookie
equals, getComment, getExpiry, getMaxAge, hashCode, isHttpOnly, isSecure, toCookie, valueOf
-
-
-
-
Constructor Detail
-
AlpineCookie
public AlpineCookie(String name, String value, String path, String domain, int version, int maxAge)
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
public AlpineCookie(String name, String value, String path, String domain, int maxAge)
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
public AlpineCookie(String name, String value, String path, String domain)
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
public AlpineCookie(String name, String value)
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 Detail
-
toString
public String 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
-
-