Skip to content

Commit

Permalink
updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanlukas committed Dec 6, 2024
1 parent 68b46fc commit 70339b7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ ObjectMapper objectMapper = new ObjectMapper();
CamundaOperateClientConfiguration configuration =
new CamundaOperateClientConfiguration(
authentication, operateUrl, objectMapper, HttpClients.createDefault());
CamundaOperateClient client = new CamundaOperateClient(configuration);
CamundaOperateClient client = new CamundaOperateClientV1(configuration);
```

Build a Camunda Operate client with identity authentication:
Expand All @@ -140,14 +140,15 @@ URL authUrl =
"http://localhost:18080/auth/realms/camunda-platform/protocol/openid-connect/token")
.toURL();
// bootstrapping
JwtCredential credentials = new JwtCredential(clientId, clientSecret, audience, authUrl, scope);
JwtCredential credentials =
new JwtCredential(clientId, clientSecret, audience, authUrl, scope);
ObjectMapper objectMapper = new ObjectMapper();
TokenResponseMapper tokenResponseMapper = new JacksonTokenResponseMapper(objectMapper);
JwtAuthentication authentication = new JwtAuthentication(credentials, tokenResponseMapper);
CamundaOperateClientConfiguration configuration =
new CamundaOperateClientConfiguration(
authentication, operateUrl, objectMapper, HttpClients.createDefault());
CamundaOperateClient client = new CamundaOperateClient(configuration);
CamundaOperateClient client = new CamundaOperateClientV1(configuration);
```

Build a Camunda Operate client for Saas:
Expand All @@ -169,7 +170,7 @@ JwtAuthentication authentication = new JwtAuthentication(credentials, tokenRespo
CamundaOperateClientConfiguration configuration =
new CamundaOperateClientConfiguration(
authentication, operateUrl, objectMapper, HttpClients.createDefault());
CamundaOperateClient client = new CamundaOperateClient(configuration);
CamundaOperateClient client = new CamundaOperateClientV1(configuration);
```

## Getting and Searching
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.fasterxml.jackson.databind.ObjectMapper;
import io.camunda.operate.CamundaOperateClient;
import io.camunda.operate.CamundaOperateClientConfiguration;
import io.camunda.operate.CamundaOperateClientV1;
import io.camunda.operate.auth.JwtAuthentication;
import io.camunda.operate.auth.JwtCredential;
import io.camunda.operate.auth.SimpleAuthentication;
Expand Down Expand Up @@ -32,7 +33,7 @@ public CamundaOperateClient createOperateClient() throws MalformedURLException {
CamundaOperateClientConfiguration configuration =
new CamundaOperateClientConfiguration(
authentication, operateUrl, objectMapper, HttpClients.createDefault());
CamundaOperateClient client = new CamundaOperateClient(configuration);
CamundaOperateClient client = new CamundaOperateClientV1(configuration);
return client;
}
}
Expand All @@ -58,7 +59,7 @@ public CamundaOperateClient createOperateClient() throws MalformedURLException {
CamundaOperateClientConfiguration configuration =
new CamundaOperateClientConfiguration(
authentication, operateUrl, objectMapper, HttpClients.createDefault());
CamundaOperateClient client = new CamundaOperateClient(configuration);
CamundaOperateClient client = new CamundaOperateClientV1(configuration);
return client;
}
}
Expand All @@ -81,7 +82,7 @@ public CamundaOperateClient createOperateClient() throws MalformedURLException {
CamundaOperateClientConfiguration configuration =
new CamundaOperateClientConfiguration(
authentication, operateUrl, objectMapper, HttpClients.createDefault());
CamundaOperateClient client = new CamundaOperateClient(configuration);
CamundaOperateClient client = new CamundaOperateClientV1(configuration);
return client;
}
}
Expand Down

0 comments on commit 70339b7

Please sign in to comment.