Skip to content

Commit

Permalink
formatted readme
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanlukas committed Dec 6, 2024
1 parent d9504d6 commit c8060a6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,15 @@ Build a Camunda Operate client with identity authentication:
String clientId = "";
String clientSecret = "";
String audience = "operate-api";
String scope = ""; // can be omitted if not required
URL operateUrl = URI.create("http://localhost:8081").toURL();
URL authUrl =
URI.create(
"http://localhost:18080/auth/realms/camunda-platform/protocol/openid-connect/token")
.toURL();
// bootstrapping
JwtCredential credentials = new JwtCredential(clientId, clientSecret, audience, authUrl);
JwtCredential credentials =
new JwtCredential(clientId, clientSecret, audience, authUrl, scope);
ObjectMapper objectMapper = new ObjectMapper();
TokenResponseMapper tokenResponseMapper = new JacksonTokenResponseMapper(objectMapper);
JwtAuthentication authentication = new JwtAuthentication(credentials, tokenResponseMapper);
Expand All @@ -150,7 +152,7 @@ CamundaOperateClient client = new CamundaOperateClient(configuration);
Build a Camunda Operate client for Saas:

```java
// properties you need to provide
// properties you need to provide
String region = "";
String clusterId = "";
String clientId = "";
Expand All @@ -159,7 +161,7 @@ String clientSecret = "";
URL operateUrl = URI.create("https://" + region + ".operate.camunda.io/" + clusterId).toURL();
URL authUrl = URI.create("https://login.cloud.camunda.io/oauth/token").toURL();
JwtCredential credentials =
new JwtCredential(clientId, clientSecret, "operate.camunda.io", authUrl);
new JwtCredential(clientId, clientSecret, "operate.camunda.io", authUrl, null);
ObjectMapper objectMapper = new ObjectMapper();
TokenResponseMapper tokenResponseMapper = new JacksonTokenResponseMapper(objectMapper);
JwtAuthentication authentication = new JwtAuthentication(credentials, tokenResponseMapper);
Expand Down
2 changes: 1 addition & 1 deletion examples/readme-snippets/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.camunda.spring</groupId>
<artifactId>operate-examples-parent</artifactId>
<version>8.7.0-SNAPSHOT</version>
<version>8.5.17-SNAPSHOT</version>
</parent>

<artifactId>readme-snippets</artifactId>
Expand Down

0 comments on commit c8060a6

Please sign in to comment.