public class AgentsDefaultSettingClient extends MindsphereAPIClient
Modifier and Type | Class and Description |
---|---|
static class |
AgentsDefaultSettingClient.ClientBuilder |
MindsphereAPIClient.Builder<T extends MindsphereAPIClient.Builder<T>>
credentials, restClientConfig, restTemplate
Constructor and Description |
---|
AgentsDefaultSettingClient(AgentsDefaultSettingClient.ClientBuilder builder) |
Modifier and Type | Method and Description |
---|---|
static AgentsDefaultSettingClient.ClientBuilder |
builder() |
CreatedObjects |
getAccessToken(String entityId)
Creates an agent for the given asset id, on boards the agent and grants an
access token.
|
CreatedObjects |
getAccessToken(String entityId,
String agentName)
Creates an agent for the given asset id, on boards the agent and grants an
access token.
|
CreatedObjects |
getAccessToken(String entityId,
String agentName,
Agent.SecurityProfileEnum profile)
Creates an agent for the given asset id, on boards the agent and grants an
access token.
|
AccessToken |
getAccessTokenAfterOnBoardedWithSharedSecret(String agentID,
String tenant,
String clientSecret)
Grants an access token when status is "ON BOARDED" for agents with
SHARED_SECRET security profile.
|
CreatedObjects |
getAccessTokenDuringStatusOnBoarding(String agentId)
On boards the agent and grants an access token when status is "ON BOARDING".
|
CreatedObjects |
getAccessTokenForAgent(String agentId)
On boards the agent and grants an access token.
|
CreatedObjects |
getAccessTokenForAgent(String agentId,
String tenant)
On boards the agent and grants an access token.
|
CreatedObjects |
getAccessTokenForEntity(String entityId,
String tenant)
Creates an agent for the given asset id, on boards the agent and grants an
access token.
|
AccessToken |
getAccessTokenFromClientAssertion(String clientAssertion)
Grants an Access Token using client assertion which can be used to access
mindsphere services.
|
CreatedObjects |
getAccessTokenWithOnBoardingConfig(BoardingConfiguration boardingConfig)
On boards the agent and grants an access token.
|
CreatedObjects |
getAccessTokenWithRSA(String entityId)
Creates an agent for the given asset id, on boards the agent and grants an
access token.
|
CreatedObjects |
getAccessTokenWithSharedSecret(String entityId)
Creates an agent for the given asset id, on boards the agent and grants an
access token.
|
String |
getClientAssertionForRSAProfile(String agentID,
String tenant)
It generates client assertion for an agent with RSA profile.
|
String |
getClientAssertionForSharedSecret(String agentID,
String tenant,
String clientSecret)
It generates client assertion for an agent with SHARED SECRET profile.
|
JWKModel |
getKeysForRSAProfile()
It geneartes RSA public and private keys.
|
public AgentsDefaultSettingClient(AgentsDefaultSettingClient.ClientBuilder builder)
public static AgentsDefaultSettingClient.ClientBuilder builder()
public CreatedObjects getAccessToken(String entityId) throws MindsphereException
200 - OK
400 - Bad Request
entityId
- asset IdMindsphereException
- if an error occurs while attempting to invoke the
APIpublic CreatedObjects getAccessTokenWithSharedSecret(String entityId) throws MindsphereException
200 - OK
400 - Bad Request
entityId
- asset IdMindsphereException
- if an error occurs while attempting to invoke the
APIpublic CreatedObjects getAccessTokenWithRSA(String entityId) throws MindsphereException
200 - OK
400 - Bad Request
entityId
- asset IdMindsphereException
- if an error occurs while attempting to invoke the
APIpublic CreatedObjects getAccessTokenForAgent(String agentId) throws MindsphereException
200 - OK
400 - Bad Request
agentId
- agentId.MindsphereException
- if an error occurs while attempting to invoke the
API
boarding configuration is interruptedpublic CreatedObjects getAccessTokenForEntity(String entityId, String tenant) throws MindsphereException
200 - OK
400 - Bad Request
entityId
- asset Idtenant
- tenantMindsphereException
- if an error occurs while attempting to invoke the
API
boarding configuration is interruptedpublic CreatedObjects getAccessTokenForAgent(String agentId, String tenant) throws MindsphereException
200 - OK
400 - Bad Request
agentId
- agentId.tenant
- tenant.MindsphereException
- if an error occurs while attempting to invoke the
API
boarding configuration is interruptedpublic CreatedObjects getAccessTokenWithOnBoardingConfig(BoardingConfiguration boardingConfig) throws MindsphereException
200 - OK
400 - Bad Request
boardingConfig
- Boarding Configuration required to on board. This can
be received from
boardingClient.getBoardingConfiguration(agentId)MindsphereException
- if an error occurs while attempting to invoke the
API
boarding configuration is interruptedpublic CreatedObjects getAccessTokenDuringStatusOnBoarding(String agentId) throws MindsphereException
200 - OK
400 - Bad Request
agentId
- agentIdMindsphereException
- if an error occurs while attempting to invoke the
API
boarding configuration is interruptedpublic AccessToken getAccessTokenAfterOnBoardedWithSharedSecret(String agentID, String tenant, String clientSecret) throws MindsphereException
200 - OK
400 - Bad Request
agentID
- agentIdtenant
- tenant.clientSecret
- clientSecret received in on boarding stage. This can be
obtained from registrationClient.onBoardAgent()MindsphereException
- if an error occurs while attempting to invoke the
APIpublic JWKModel getKeysForRSAProfile() throws MindsphereClientException
200 - OK
400 - Bad Request
MindsphereClientException
- if an error occurs while creating RSA Keys.public String getClientAssertionForRSAProfile(String agentID, String tenant) throws MindsphereClientException
200 - OK
400 - Bad Request
agentID
- agentIdtenant
- tenant.MindsphereClientException
- if an error occurs while creating client
assertionpublic String getClientAssertionForSharedSecret(String agentID, String tenant, String clientSecret) throws MindsphereClientException
200 - OK
400 - Bad Request
agentID
- agentIdtenant
- tenant.clientSecret
- clientSecret obtained while on boarding the agentMindsphereClientException
- if an error occurs while attempting to
create client assertionpublic CreatedObjects getAccessToken(String entityId, String agentName, Agent.SecurityProfileEnum profile) throws MindsphereException
200 - OK
400 - Bad Request
entityId
- asset IdagentName
- agent Nameprofile
- SHARED_SECRET/ RSAMindsphereException
- if an error occurs while attempting to invoke the
API
boarding configuration is interruptedpublic CreatedObjects getAccessToken(String entityId, String agentName) throws MindsphereException
200 - OK
400 - Bad Request
entityId
- asset IdagentName
- agent NameMindsphereException
- if an error occurs while attempting to invoke the
APIpublic AccessToken getAccessTokenFromClientAssertion(String clientAssertion) throws MindsphereException
200 - OK
400 - Bad Request
clientAssertion
- client Assertion this can be obtained from
agentsDefaultSettingClient.getClientAssertionForSharedSecret()
or
agentsDefaultSettingClient.getClientAssertionForRSA()MindsphereException
- if an error occurs while attempting to invoke the
API