Package com.nimbusds.oauth2.sdk
Class ResponseMode
java.lang.Object
com.nimbusds.oauth2.sdk.id.Identifier
com.nimbusds.oauth2.sdk.ResponseMode
- All Implemented Interfaces:
Serializable
,Comparable<Identifier>
,net.minidev.json.JSONAware
Authorisation response mode.
Related specifications:
- OAuth 2.0 Multiple Response Type Encoding Practices 1.0.
- OAuth 2.0 Form Post Response Mode 1.0.
- Financial-grade API: JWT Secured Authorization Response Mode for OAuth 2.0 (JARM).
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ResponseMode
The authorisation response parameters are encoded as HTML form values that are auto-submitted in the User Agent, and thus are transmitted via the HTTP POST method to the client, with the result parameters being encoded in the body using theapplication/x-www-form-urlencoded
format.static final ResponseMode
The authorisation response parameters are packaged in a JSON Web Token (JWT) which is transmitted via the HTTP POST method to the client.static final ResponseMode
The authorisation response parameters are encoded in the fragment added to theredirect_uri
when redirecting back to the client.static final ResponseMode
The authorisation response parameters are packaged in a JSON Web Token (JWT) which is returned as aresponse
fragment parameter added to theredirect_uri
when redirecting back to the client.static final ResponseMode
The authorisation response parameters are packaged in a JSON Web Token (JWT) which is returned as aresponse
parameter using the redirect encoding (query.jwt
,fragment.jwt
for the requestedresponse_type
.static final ResponseMode
The authorisation response parameters are encoded in the query string added to theredirect_uri
when redirecting back to the client.static final ResponseMode
The authorisation response parameters are packaged in a JSON Web Token (JWT) which is returned as aresponse
query parameter added to theredirect_uri
when redirecting back to the client.Fields inherited from class com.nimbusds.oauth2.sdk.id.Identifier
DEFAULT_BYTE_LENGTH, secureRandom
-
Constructor Summary
ConstructorsConstructorDescriptionResponseMode
(String value) Creates a new authorisation response mode with the specified value. -
Method Summary
Modifier and TypeMethodDescriptionboolean
static ResponseMode
resolve
(ResponseMode rm, ResponseType rt) Resolves the requested response mode.static ResponseMode
Resolves the appropriate JWT-secured authorisation response mode (JARM) for the specified response typeMethods inherited from class com.nimbusds.oauth2.sdk.id.Identifier
compareTo, getValue, hashCode, toJSONString, toString, toStringList
-
Field Details
-
QUERY
The authorisation response parameters are encoded in the query string added to theredirect_uri
when redirecting back to the client. -
FRAGMENT
The authorisation response parameters are encoded in the fragment added to theredirect_uri
when redirecting back to the client. -
FORM_POST
The authorisation response parameters are encoded as HTML form values that are auto-submitted in the User Agent, and thus are transmitted via the HTTP POST method to the client, with the result parameters being encoded in the body using theapplication/x-www-form-urlencoded
format. The action attribute of the form MUST be the client's redirection URI. The method of the form attribute MUST be POST. -
QUERY_JWT
The authorisation response parameters are packaged in a JSON Web Token (JWT) which is returned as aresponse
query parameter added to theredirect_uri
when redirecting back to the client. -
FRAGMENT_JWT
The authorisation response parameters are packaged in a JSON Web Token (JWT) which is returned as aresponse
fragment parameter added to theredirect_uri
when redirecting back to the client. -
FORM_POST_JWT
The authorisation response parameters are packaged in a JSON Web Token (JWT) which is transmitted via the HTTP POST method to the client. The action attribute of the form MUST be the client's redirection URI. The method of the form attribute MUST be POST. -
JWT
The authorisation response parameters are packaged in a JSON Web Token (JWT) which is returned as aresponse
parameter using the redirect encoding (query.jwt
,fragment.jwt
for the requestedresponse_type
.
-
-
Constructor Details
-
ResponseMode
Creates a new authorisation response mode with the specified value.- Parameters:
value
- The response mode value. Must not benull
.
-
-
Method Details
-
resolve
Resolves the requested response mode.If the
jwt
response mode shortcut from JARM is explicitly requested expands it toquery.jwt
orfragment.jwt
depending on the response type (response_type
).- Parameters:
rm
- The explicitly requested response mode (response_mode
),null
if not specified.rt
- The response type (response_type
),null
if not known.- Returns:
- The resolved response mode.
-
resolveJARM
Resolves the appropriate JWT-secured authorisation response mode (JARM) for the specified response type- Parameters:
rt
- The response type (response_type
). Must not benull
.- Returns:
- A
query.jwt
orfragment.jwt
response mode.
-
equals
- Overrides:
equals
in classIdentifier
-