public class ClientIdAn OAuth2 user authorization Client ID and associated information.
Corresponds to the information in the json file downloadable for a Client ID.
Methods
fromJson(Map<String,Object> json)
public static ClientId fromJson(Map<String,Object> json)Constructs a Client ID from JSON from a downloaded file.
| Name | Description |
| json | Map<String,Object>the JSON from the downloaded file |
| Type | Description |
| ClientId | the ClientId instance based on the JSON |
| Type | Description |
| IOException | the JSON could not be parsed |
fromResource(Class<?> relativeClass, String resourceName)
public static ClientId fromResource(Class<?> relativeClass, String resourceName)Constructs a Client ID from JSON file stored as a resource.
| Name | Description |
| relativeClass | Class<?>a class in the same namespace as the resource |
| resourceName | Stringthe name of the resource |
| Type | Description |
| ClientId | the constructed ClientID instance based on the JSON in the resource |
| Type | Description |
| IOException | The JSON could not be loaded or parsed. |
fromStream(InputStream stream)
public static ClientId fromStream(InputStream stream)Constructs a Client ID from JSON file stream.
| Name | Description |
| stream | InputStreamthe downloaded JSON file |
| Type | Description |
| ClientId | the constructed ClientID instance based on the JSON in the stream |
| Type | Description |
| IOException | the JSON could not be read or parsed |
getClientId()
public final String getClientId()Returns the text identifier of the Client ID.
| Type | Description |
| String | The text identifier of the Client ID. |
getClientSecret()
public final String getClientSecret()Returns the secret associated with the Client ID.
| Type | Description |
| String | The secret associated with the Client ID. |
newBuilder()
public static ClientId.Builder newBuilder()| Type | Description |
| ClientId.Builder |
of(String clientId, String clientSecret)
public static ClientId of(String clientId, String clientSecret)Constructs a client ID from an explicit ID and secret.
Note: Direct use of this factory method in application code is not recommended to avoid having secrets or values that need to be updated in source code.
| Name | Description |
| clientId | StringText identifier of the Client ID. |
| clientSecret | StringSecret to associated with the Client ID. |
| Type | Description |
| ClientId | The ClientId instance. |
toBuilder()
public ClientId.Builder toBuilder()| Type | Description |
| ClientId.Builder |