Package net.openid.appauth
Class RegistrationRequest
- java.lang.Object
-
- net.openid.appauth.RegistrationRequest
-
public class RegistrationRequest extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RegistrationRequest.Builder
Creates instances ofRegistrationRequest
.
-
Field Summary
Fields Modifier and Type Field Description Map<String,String>
additionalParameters
Additional parameters to be passed as part of the request.static String
APPLICATION_TYPE_NATIVE
OpenID Connect ‘application_type’.String
applicationType
The application type to register, will always be ‘native’.AuthorizationServiceConfiguration
configuration
The service’sconfiguration
.List<String>
grantTypes
The grant types to use.JSONObject
jwks
Client’s JSON Web Key Set [JWK] document.Uri
jwksUri
URL for the Client’s JSON Web Key Set [JWK] document.List<Uri>
redirectUris
The client’s redirect URI’s.List<String>
responseTypes
The response types to use.static String
SUBJECT_TYPE_PAIRWISE
Instructs the authorization server to generate a pairwise subject identifier.static String
SUBJECT_TYPE_PUBLIC
Instructs the authorization server to generate a public subject identifier.String
subjectType
The subject type to use.String
tokenEndpointAuthenticationMethod
The client authentication method to use at the token endpoint.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RegistrationRequest
jsonDeserialize(String jsonStr)
Reads a registration request from a JSON string representation produced byjsonSerializeString()
.static RegistrationRequest
jsonDeserialize(JSONObject json)
Reads a registration request from a JSON string representation produced byjsonSerialize()
.JSONObject
jsonSerialize()
Produces a JSON representation of the registration request for persistent storage or local transmission (e.g.String
jsonSerializeString()
Produces a JSON string representation of the registration request for persistent storage or local transmission (e.g.String
toJsonString()
Converts the registration request to JSON for transmission to an authorization service.
-
-
-
Field Detail
-
APPLICATION_TYPE_NATIVE
public static final String APPLICATION_TYPE_NATIVE
OpenID Connect ‘application_type’.- See Also:
- Constant Field Values
-
SUBJECT_TYPE_PAIRWISE
public static final String SUBJECT_TYPE_PAIRWISE
Instructs the authorization server to generate a pairwise subject identifier.- See Also:
“OpenID Connect Core 1.0, Section 8 https://openid.net/specs/openid-connect-core-1_0.html#rfc.section.8”
, Constant Field Values
-
SUBJECT_TYPE_PUBLIC
public static final String SUBJECT_TYPE_PUBLIC
Instructs the authorization server to generate a public subject identifier.- See Also:
“OpenID Connect Core 1.0, Section 8 https://openid.net/specs/openid-connect-core-1_0.html#rfc.section.8”
, Constant Field Values
-
configuration
@NonNull public final AuthorizationServiceConfiguration configuration
The service’sconfiguration
.This configuration specifies how to connect to a particular OAuth provider. Configurations may be
created manually
, orvia an OpenID Connect Discovery Document
.
-
redirectUris
@NonNull public final List<Uri> redirectUris
The client’s redirect URI’s.- See Also:
“The OAuth 2.0 Authorization Framework (RFC 6749), Section 3.1.2 https://tools.ietf.org/html/rfc6749#section-3.1.2”
-
applicationType
@NonNull public final String applicationType
The application type to register, will always be ‘native’.
-
responseTypes
@Nullable public final List<String> responseTypes
The response types to use.- See Also:
“OpenID Connect Core 1.0, Section 3 https://openid.net/specs/openid-connect-core-1_0.html#rfc.section.3”
-
grantTypes
@Nullable public final List<String> grantTypes
The grant types to use.- See Also:
“OpenID Connect Dynamic Client Registration 1.0, Section 2 https://openid.net/specs/openid-connect-discovery-1_0.html#rfc.section.2”
-
subjectType
@Nullable public final String subjectType
The subject type to use.- See Also:
“OpenID Connect Core 1.0, Section 8 https://openid.net/specs/openid-connect-core-1_0.html#rfc.section.8”
-
jwksUri
@Nullable public final Uri jwksUri
URL for the Client’s JSON Web Key Set [JWK] document.- See Also:
“OpenID Connect Dynamic Client Registration 1.0, Client Metadata https://openid.net/specs/openid-connect-registration-1_0.html#ClientMetadata”
-
jwks
@Nullable public final JSONObject jwks
Client’s JSON Web Key Set [JWK] document.- See Also:
“OpenID Connect Dynamic Client Registration 1.0, Client Metadata https://openid.net/specs/openid-connect-registration-1_0.html#ClientMetadata”
-
tokenEndpointAuthenticationMethod
@Nullable public final String tokenEndpointAuthenticationMethod
The client authentication method to use at the token endpoint.- See Also:
“OpenID Connect Core 1.0, Section 9 https://openid.net/specs/openid-connect-core-1_0.html#rfc.section.9”
-
additionalParameters
@NonNull public final Map<String,String> additionalParameters
Additional parameters to be passed as part of the request.
-
-
Method Detail
-
toJsonString
@NonNull public String toJsonString()
Converts the registration request to JSON for transmission to an authorization service.For local persistence and transmission, use
jsonSerialize()
.
-
jsonSerialize
@NonNull public JSONObject jsonSerialize()
Produces a JSON representation of the registration request for persistent storage or local transmission (e.g.between activities).
-
jsonSerializeString
@NonNull public String jsonSerializeString()
Produces a JSON string representation of the registration request for persistent storage or local transmission (e.g.between activities). This method is just a convenience wrapper for
jsonSerialize()
, converting the JSON object to its string form.
-
jsonDeserialize
public static RegistrationRequest jsonDeserialize(@NonNull JSONObject json) throws JSONException
Reads a registration request from a JSON string representation produced byjsonSerialize()
.- Throws:
JSONException
- if the provided JSON does not match the expected structure.
-
jsonDeserialize
public static RegistrationRequest jsonDeserialize(@NonNull String jsonStr) throws JSONException
Reads a registration request from a JSON string representation produced byjsonSerializeString()
.This method is just a convenience wrapper for
jsonDeserialize(JSONObject)
, converting the JSON string to its JSON object form.- Throws:
JSONException
- if the provided JSON does not match the expected structure.
-
-