Class ClientId (1.26.0)
Stay organized with collections
Save and categorize content based on your preferences.
publicclass ClientIdAn OAuth2 user authorization Client ID and associated information.
Corresponds to the information in the json file downloadable for a Client ID.
Inherited Members
Static Methods
fromJson(Map<String,Object> json)
publicstaticClientIdfromJson(Map<String,Object>json)Constructs a Client ID from JSON from a downloaded file.
| Parameter | |
|---|---|
| Name | Description |
json |
Map<String,Object>the JSON from the downloaded file |
| Returns | |
|---|---|
| Type | Description |
ClientId |
the ClientId instance based on the JSON |
| Exceptions | |
|---|---|
| Type | Description |
IOException |
the JSON could not be parsed |
fromResource(Class<?> relativeClass, String resourceName)
publicstaticClientIdfromResource(Class<?>relativeClass,StringresourceName)Constructs a Client ID from JSON file stored as a resource.
| Parameters | |
|---|---|
| Name | Description |
relativeClass |
Class<?>a class in the same namespace as the resource |
resourceName |
String the name of the resource |
| Returns | |
|---|---|
| Type | Description |
ClientId |
the constructed ClientID instance based on the JSON in the resource |
| Exceptions | |
|---|---|
| Type | Description |
IOException |
The JSON could not be loaded or parsed. |
fromStream(InputStream stream)
publicstaticClientIdfromStream(InputStreamstream)Constructs a Client ID from JSON file stream.
| Parameter | |
|---|---|
| Name | Description |
stream |
InputStream the downloaded JSON file |
| Returns | |
|---|---|
| Type | Description |
ClientId |
the constructed ClientID instance based on the JSON in the stream |
| Exceptions | |
|---|---|
| Type | Description |
IOException |
the JSON could not be read or parsed |
newBuilder()
publicstaticClientId.BuildernewBuilder()| Returns | |
|---|---|
| Type | Description |
ClientId.Builder |
|
of(String clientId, String clientSecret)
publicstaticClientIdof(StringclientId,StringclientSecret)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.
| Parameters | |
|---|---|
| Name | Description |
clientId |
String Text identifier of the Client ID. |
clientSecret |
String Secret to associated with the Client ID. |
| Returns | |
|---|---|
| Type | Description |
ClientId |
The ClientId instance. |
Methods
getClientId()
publicfinalStringgetClientId()Returns the text identifier of the Client ID.
| Returns | |
|---|---|
| Type | Description |
String |
The text identifier of the Client ID. |
getClientSecret()
publicfinalStringgetClientSecret()Returns the secret associated with the Client ID.
| Returns | |
|---|---|
| Type | Description |
String |
The secret associated with the Client ID. |
toBuilder()
publicClientId.BuildertoBuilder()| Returns | |
|---|---|
| Type | Description |
ClientId.Builder |
|