public enum ResponseMode extends Enum<ResponseMode>
response_mode.
From OAuth 2.0 Multiple Response Type Encoding Practices, 2.1. Response Modes
query- In this mode, Authorization Response parameters are encoded in the query string added to the
redirect_uriwhen redirecting back to the Client.
fragment- In this mode, Authorization Response parameters are encoded in the fragment added to the
redirect_uriwhen redirecting back to the Client.
From OAuth 2.0 Form Post Response Mode
form_post- In this mode, Authorization Response parameters are encoded as HTML form values that are auto-submitted in the User Agent, and thus are transmitted via the HTTP
POSTmethod to the Client, with the result parameters being encoded in the body using theapplication/x-www-form-urlencodedformat. The action attribute of the form MUST be the Client's Redirection URI. The method of the form attribute MUST bePOST.
Any technique supported by the User Agent MAY be used to cause the submission of the form, and any form content necessary to support this MAY be included, such as submit controls and client-side scripting commands. However, the Client MUST be able to process the message without regard for the mechanism by which the form submission was initiated.
| Enum Constant and Description |
|---|
FORM_POST
"form_post" (3); response_mode to request authorization
response parameters be encoded as HTML form values. |
FRAGMENT
"fragment" (2); response_mode to request authorization
response parameters be encoded in the fragment. |
QUERY
"query" (1); response_mode to request authorization
response parameters be encoded in the query string. |
| Modifier and Type | Method and Description |
|---|---|
static ResponseMode |
getByValue(short value)
Find an instance of this enum by a value.
|
short |
getValue()
Get the integer representation of this enum instance.
|
static ResponseMode |
parse(String responseMode)
Convert
String to ResponseMode. |
static ResponseMode[] |
toArray(int bits) |
static int |
toBits(EnumSet<ResponseMode> set) |
static EnumSet<ResponseMode> |
toSet(int bits) |
static EnumSet<ResponseMode> |
toSet(ResponseMode[] array) |
String |
toString() |
static ResponseMode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ResponseMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ResponseMode QUERY
"query" (1); response_mode to request authorization
response parameters be encoded in the query string.public static final ResponseMode FRAGMENT
"fragment" (2); response_mode to request authorization
response parameters be encoded in the fragment.public static final ResponseMode FORM_POST
"form_post" (3); response_mode to request authorization
response parameters be encoded as HTML form values.public static ResponseMode[] values()
for (ResponseMode c : ResponseMode.values()) System.out.println(c);
public static ResponseMode valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic short getValue()
public String toString()
toString in class Enum<ResponseMode>public static ResponseMode getByValue(short value)
value - The integer representation of the instance to find.null if not found.public static ResponseMode parse(String responseMode)
String to ResponseMode.responseMode - A response mode. For example, "query".ResponseMode instance, or null.public static int toBits(EnumSet<ResponseMode> set)
public static ResponseMode[] toArray(int bits)
public static EnumSet<ResponseMode> toSet(int bits)
public static EnumSet<ResponseMode> toSet(ResponseMode[] array)
Copyright © 2017. All rights reserved.