public class RegistrationResponse extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
RegistrationResponse.Builder |
static class |
RegistrationResponse.MissingArgumentException
Thrown when a mandatory property is missing from the registration response.
|
| Modifier and Type | Field and Description |
|---|---|
Map<String,String> |
additionalParameters
Additional, non-standard parameters in the response.
|
String |
clientId
The registered client identifier.
|
Long |
clientIdIssuedAt
Timestamp of when the client identifier was issued, if provided.
|
String |
clientSecret
The client secret, which is part of the client credentials, if provided.
|
Long |
clientSecretExpiresAt
Timestamp of when the client credentials expires, if provided.
|
String |
registrationAccessToken
Client registration access token that can be used for subsequent operations upon the client
registration.
|
android.net.Uri |
registrationClientUri
Location of the client configuration endpoint, if provided.
|
RegistrationRequest |
request
The registration request associated with this response.
|
String |
tokenEndpointAuthMethod
Client authentication method to use at the token endpoint, if provided.
|
| Modifier and Type | Method and Description |
|---|---|
static RegistrationResponse |
fromJson(RegistrationRequest request,
org.json.JSONObject json)
Reads a registration response JSON object received from an authorization server,
and associates it with the provided request.
|
static RegistrationResponse |
fromJson(RegistrationRequest request,
String jsonStr)
Reads a registration response JSON string received from an authorization server,
and associates it with the provided request.
|
boolean |
hasClientSecretExpired()
Determines whether the returned access token has expired.
|
static RegistrationResponse |
jsonDeserialize(org.json.JSONObject json)
Reads a registration response from a JSON string representation produced by
jsonSerialize(). |
static RegistrationResponse |
jsonDeserialize(String jsonStr)
Reads a registration response from a JSON string representation produced by
jsonSerializeString(). |
org.json.JSONObject |
jsonSerialize()
Produces a JSON representation of the registration response for persistent storage or
local transmission (e.g.
|
String |
jsonSerializeString()
Produces a JSON string representation of the registration response for persistent storage or
local transmission (e.g.
|
@NonNull public final RegistrationRequest request
The registration request associated with this response.
@NonNull public final String clientId
The registered client identifier.
@Nullable public final Long clientIdIssuedAt
Timestamp of when the client identifier was issued, if provided.
@Nullable public final String clientSecret
The client secret, which is part of the client credentials, if provided.
@Nullable public final Long clientSecretExpiresAt
Timestamp of when the client credentials expires, if provided.
@Nullable public final String registrationAccessToken
Client registration access token that can be used for subsequent operations upon the client registration.
@Nullable public final android.net.Uri registrationClientUri
Location of the client configuration endpoint, if provided.
@Nullable public final String tokenEndpointAuthMethod
Client authentication method to use at the token endpoint, if provided.
@NonNull public static RegistrationResponse fromJson(@NonNull RegistrationRequest request, @NonNull String jsonStr) throws org.json.JSONException, RegistrationResponse.MissingArgumentException
Reads a registration response JSON string received from an authorization server, and associates it with the provided request.
org.json.JSONException - if the JSON is malformed or missing required fields.RegistrationResponse.MissingArgumentException - if the JSON is missing fields required by the specification.@NonNull public static RegistrationResponse fromJson(@NonNull RegistrationRequest request, @NonNull org.json.JSONObject json) throws org.json.JSONException, RegistrationResponse.MissingArgumentException
Reads a registration response JSON object received from an authorization server, and associates it with the provided request.
org.json.JSONException - if the JSON is malformed or missing required fields.RegistrationResponse.MissingArgumentException - if the JSON is missing fields required by the specification.@NonNull public org.json.JSONObject jsonSerialize()
Produces a JSON representation of the registration response for persistent storage or local transmission (e.g. between activities).
@NonNull public String jsonSerializeString()
Produces a JSON string representation of the registration response 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.
public static RegistrationResponse jsonDeserialize(@NonNull org.json.JSONObject json) throws org.json.JSONException
Reads a registration response from a JSON string representation produced by
jsonSerialize().
org.json.JSONException - if the provided JSON does not match the expected structure.@NonNull public static RegistrationResponse jsonDeserialize(@NonNull String jsonStr) throws org.json.JSONException
Reads a registration response from a JSON string representation produced by
jsonSerializeString(). This method is just a convenience wrapper for
jsonDeserialize(JSONObject), converting the JSON string to its JSON object form.
org.json.JSONException - if the provided JSON does not match the expected structure.public boolean hasClientSecretExpired()
Determines whether the returned access token has expired.