public class TokenManagerClient extends MindsphereAPIClient
Modifier and Type | Class and Description |
---|---|
static class |
TokenManagerClient.ClientBuilder |
MindsphereAPIClient.Builder<T extends MindsphereAPIClient.Builder<T>>
credentials, restClientConfig, restTemplate
Constructor and Description |
---|
TokenManagerClient(TokenManagerClient.ClientBuilder builder) |
Modifier and Type | Method and Description |
---|---|
static TokenManagerClient.ClientBuilder |
builder() |
AccessTokenResponse |
getToken()
Get token to access customer IoT data.
|
AccessTokenResponse |
getToken(String keyStoreClientId,
String keyStoreClientSecret)
Get token to access customer IoT data.
|
AccessTokenResponse |
getToken(String appName,
String appVersion,
String keyStoreClientId,
String keyStoreClientSecret)
Get token to access customer IoT data.
|
public TokenManagerClient(TokenManagerClient.ClientBuilder builder)
public static TokenManagerClient.ClientBuilder builder()
public AccessTokenResponse getToken() throws MindsphereException
200 - returns a valid token.
401 - Authentication information is missing or invalid
500 - Internal Error
MindsphereException
- if an error occurs while attempting to invoke the APIpublic AccessTokenResponse getToken(String keyStoreClientId, String keyStoreClientSecret) throws MindsphereException
200 - returns a valid token.
401 - Authentication information is missing or invalid
500 - Internal Error
keyStoreClientId
- key store client idkeyStoreClientSecret
- key store client secretMindsphereException
- if an error occurs while attempting to invoke the APIpublic AccessTokenResponse getToken(String appName, String appVersion, String keyStoreClientId, String keyStoreClientSecret) throws MindsphereException
200 - returns a valid token.
401 - Authentication information is missing or invalid
500 - Internal Error
appName
- application nameappVersion
- application versionkeyStoreClientId
- key store client idkeyStoreClientSecret
- key store client secretMindsphereException
- if an error occurs while attempting to invoke the API