public static final class RegistrationResponse.Builder extends Object
| Constructor and Description |
|---|
Builder(RegistrationRequest request)
Creates a token response associated with the specified request.
|
| Modifier and Type | Method and Description |
|---|---|
RegistrationResponse |
build()
Creates the token response instance.
|
RegistrationResponse.Builder |
fromResponseJson(org.json.JSONObject json)
Extracts token response fields from a JSON object.
|
RegistrationResponse.Builder |
fromResponseJsonString(String jsonStr)
Extracts registration response fields from a JSON string.
|
RegistrationResponse.Builder |
setAdditionalParameters(Map<String,String> additionalParameters)
Specifies the additional, non-standard parameters received as part of the response.
|
RegistrationResponse.Builder |
setClientId(String clientId)
Specifies the client identifier.
|
RegistrationResponse.Builder |
setClientIdIssuedAt(Long clientIdIssuedAt)
Specifies the timestamp for when the client identifier was issued.
|
RegistrationResponse.Builder |
setClientSecret(String clientSecret)
Specifies the client secret.
|
RegistrationResponse.Builder |
setClientSecretExpiresAt(Long clientSecretExpiresAt)
Specifies the expiration time of the client secret.
|
RegistrationResponse.Builder |
setRegistrationAccessToken(String registrationAccessToken)
Specifies the registration access token.
|
RegistrationResponse.Builder |
setRegistrationClientUri(android.net.Uri registrationClientUri)
Specifies the client configuration endpoint.
|
RegistrationResponse.Builder |
setRequest(RegistrationRequest request)
Specifies the request associated with this response.
|
RegistrationResponse.Builder |
setTokenEndpointAuthMethod(String tokenEndpointAuthMethod)
Specifies the client authentication method to use at the token endpoint.
|
public Builder(@NonNull
RegistrationRequest request)
Creates a token response associated with the specified request.
@NonNull public RegistrationResponse.Builder setRequest(@NonNull RegistrationRequest request)
Specifies the request associated with this response. Must not be null.
public RegistrationResponse.Builder setClientId(@NonNull String clientId)
Specifies the client identifier.
public RegistrationResponse.Builder setClientIdIssuedAt(@Nullable Long clientIdIssuedAt)
Specifies the timestamp for when the client identifier was issued.
public RegistrationResponse.Builder setClientSecret(@Nullable String clientSecret)
Specifies the client secret.
public RegistrationResponse.Builder setClientSecretExpiresAt(@Nullable Long clientSecretExpiresAt)
Specifies the expiration time of the client secret.
public RegistrationResponse.Builder setRegistrationAccessToken(@Nullable String registrationAccessToken)
Specifies the registration access token.
public RegistrationResponse.Builder setTokenEndpointAuthMethod(@Nullable String tokenEndpointAuthMethod)
Specifies the client authentication method to use at the token endpoint.
public RegistrationResponse.Builder setRegistrationClientUri(@Nullable android.net.Uri registrationClientUri)
Specifies the client configuration endpoint.
public RegistrationResponse.Builder setAdditionalParameters(Map<String,String> additionalParameters)
Specifies the additional, non-standard parameters received as part of the response.
public RegistrationResponse build()
Creates the token response instance.
@NonNull public RegistrationResponse.Builder fromResponseJsonString(@NonNull String jsonStr) throws org.json.JSONException, RegistrationResponse.MissingArgumentException
Extracts registration response fields from a JSON string.
org.json.JSONException - if the JSON is malformed or has incorrect value types for fields.RegistrationResponse.MissingArgumentException - if the JSON is missing fields required by the
specification.@NonNull public RegistrationResponse.Builder fromResponseJson(@NonNull org.json.JSONObject json) throws org.json.JSONException, RegistrationResponse.MissingArgumentException
Extracts token response fields from a JSON object.
org.json.JSONException - if the JSON is malformed or has incorrect value types for fields.RegistrationResponse.MissingArgumentException - if the JSON is missing fields required by the
specification.