Package org.cyclos.model.utils
Enum Cookie
- java.lang.Object
-
- java.lang.Enum<Cookie>
-
- org.cyclos.model.utils.Cookie
-
- All Implemented Interfaces:
Serializable,Comparable<Cookie>
public enum Cookie extends Enum<Cookie>
HTTP cookies used by Cyclos. This enumeration was created after cookies began to be used, in addition, these cookies did not follow the same format for the name they used. Therefore, for backward compatibility, the name must be explicitly defined for each enumeration value instead of being inferred from the value name.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description IDENTITY_PROVIDER_REQUEST_IDUsed to identify the request performed to an identity provider when logging-in using it.INVITE_TOKENUsed in a public registration to link the user being registered with the user who sent the invitation.SESSION_TOKENThis cookie represents only the second part of the final token used to identify the current user session.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringcookieName()Rewrite the name as camel-case.static CookievalueOf(String name)Returns the enum constant of this type with the specified name.static Cookie[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
SESSION_TOKEN
public static final Cookie SESSION_TOKEN
This cookie represents only the second part of the final token used to identify the current user session. A prefix is also required.
-
INVITE_TOKEN
public static final Cookie INVITE_TOKEN
Used in a public registration to link the user being registered with the user who sent the invitation.
-
IDENTITY_PROVIDER_REQUEST_ID
public static final Cookie IDENTITY_PROVIDER_REQUEST_ID
Used to identify the request performed to an identity provider when logging-in using it.
-
-
Method Detail
-
values
public static Cookie[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Cookie c : Cookie.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Cookie valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException- if the argument is null
-
cookieName
public String cookieName()
Rewrite the name as camel-case.
-
-