Package eu.webtoolkit.jwt.auth
Enum Class AuthCookiePrefix
- All Implemented Interfaces:
Serializable,Comparable<AuthCookiePrefix>,Constable
Enumeration that describes the possible auth cookie prefix.
Cookie prefixes are prefix that are added to the cookies name to enforce some rules on it. This allows to prevent some attacks where the attacker would try to update the cookies attribute.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionintgetValue()Returns the numerical representation of this enum.static AuthCookiePrefixReturns the enum constant of this class with the specified name.static AuthCookiePrefix[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
Empty
No prefix. -
Secure
__Secure- prefixThis prefix ensure that the cookies has the Secure attribute set and ensure that the cookie is set by an HTTPS page.
This requires that the request was made over HTTPS.
-
Host
__Host- prefixThis prefix adds the same restriction as the __Secure- prefix with the addition that the cookie can only be sent to the host subdomain or domain that set it. It also enforces that the Domain atrribute is not set, and that the Path attribute is set to "/".
- See Also:
-
Auto
Automatically choose the prefix.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getValue
public int getValue()Returns the numerical representation of this enum.
-