Package net.oauth
Enum ParameterStyle
- java.lang.Object
-
- java.lang.Enum<ParameterStyle>
-
- net.oauth.ParameterStyle
-
- All Implemented Interfaces:
Serializable,Comparable<ParameterStyle>
public enum ParameterStyle extends Enum<ParameterStyle>
Where to place OAuth parameters in an HTTP message. The alternatives are summarized in OAuth Core section 5.2.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description AUTHORIZATION_HEADERSend parameters whose names begin with "oauth_" in an HTTP header, and other parameters (whose names don't begin with "oauth_") in either the message body or URL query string.BODYSend all parameters in the message body, with a Content-Type of application/x-www-form-urlencoded.QUERY_STRINGSend all parameters in the query string part of the URL.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ParameterStylevalueOf(String name)Returns the enum constant of this type with the specified name.static ParameterStyle[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
AUTHORIZATION_HEADER
public static final ParameterStyle AUTHORIZATION_HEADER
Send parameters whose names begin with "oauth_" in an HTTP header, and other parameters (whose names don't begin with "oauth_") in either the message body or URL query string. The header formats are specified by OAuth Core section 5.4.
-
BODY
public static final ParameterStyle BODY
Send all parameters in the message body, with a Content-Type of application/x-www-form-urlencoded.
-
QUERY_STRING
public static final ParameterStyle QUERY_STRING
Send all parameters in the query string part of the URL.
-
-
Method Detail
-
values
public static ParameterStyle[] 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 (ParameterStyle c : ParameterStyle.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ParameterStyle 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
-
-