public class AccessTokenClient extends MindsphereAPIClient
Modifier and Type | Class and Description |
---|---|
static class |
AccessTokenClient.ClientBuilder |
MindsphereAPIClient.Builder<T extends MindsphereAPIClient.Builder<T>>
credentials, restClientConfig, restTemplate
Constructor and Description |
---|
AccessTokenClient(AccessTokenClient.ClientBuilder builder) |
Modifier and Type | Method and Description |
---|---|
static AccessTokenClient.ClientBuilder |
builder() |
AccessToken |
getAccessToken(String grantType,
String clientAssertionType,
String clientAssertion)
Grants an Access Token which can be used to access mindsphere services.
|
TokenKey |
getPublicKeyFromServer(String ifNoneMatch)
Provide key information of OAuth Server Provides key information of OAuth
Server.
|
public AccessTokenClient(AccessTokenClient.ClientBuilder builder)
public static AccessTokenClient.ClientBuilder builder()
public TokenKey getPublicKeyFromServer(String ifNoneMatch) throws MindsphereException
200 - OK
304 - Not Modified
ifNoneMatch
- If-None-Match Parameter.MindsphereException
- if an error occurs while attempting to invoke the
APIpublic AccessToken getAccessToken(String grantType, String clientAssertionType, String clientAssertion) throws MindsphereException
200 - OK
400 - Bad Request
grantType
- The type of authentication being used to obtain
the token, only client_credentials is supported.clientAssertionType
- Defines the assertion type, only
urn:ietf:params:oauth:client-assertion-type:jwt-bearer
is supported.clientAssertion
- Token is signed (by the client) with keys (which
is provided at '/register' |
'/register/<client_id>' endpoint) or
client_secret (which is provided by
'/register' |
'/register/<client_id>' endpoint) in
jwt format.MindsphereException
- if an error occurs while attempting to invoke the
API