Skip to content

Commit 0b004dc

Browse files
committed
feat: add oauth scope (for entra id)
1 parent 81f4a22 commit 0b004dc

File tree

4 files changed

+6
-2
lines changed

4 files changed

+6
-2
lines changed

extension/java-client-operate/src/main/java/io/camunda/operate/auth/JwtAuthentication.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ private HttpPost buildRequest() throws URISyntaxException {
7373
formParams.add(new BasicNameValuePair("client_id", jwtCredential.clientId()));
7474
formParams.add(new BasicNameValuePair("client_secret", jwtCredential.clientSecret()));
7575
formParams.add(new BasicNameValuePair("audience", jwtCredential.audience()));
76+
formParams.add(new BasicNameValuePair("scope", jwtCredential.scope()));
7677
httpPost.setEntity(new UrlEncodedFormEntity(formParams));
7778
return httpPost;
7879
}

extension/java-client-operate/src/main/java/io/camunda/operate/auth/JwtCredential.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22

33
import java.net.URL;
44

5-
public record JwtCredential(String clientId, String clientSecret, String audience, URL authUrl) {}
5+
public record JwtCredential(
6+
String clientId, String clientSecret, String audience, URL authUrl, String scope) {}

extension/spring-boot-starter-camunda-operate/src/main/java/io/camunda/operate/spring/OperateClientConfiguration.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ public Authentication authentication() {
7676
properties.clientId(),
7777
properties.clientSecret(),
7878
properties.audience(),
79-
properties.authUrl()),
79+
properties.authUrl(),
80+
properties.scope()),
8081
new JacksonTokenResponseMapper(objectMapper));
8182
}
8283
default -> throw new IllegalStateException("Unsupported profile: " + properties.profile());

extension/spring-boot-starter-camunda-operate/src/main/java/io/camunda/operate/spring/OperateClientConfigurationProperties.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ public record OperateClientConfigurationProperties(
1919
String clientSecret,
2020
URL authUrl,
2121
String audience,
22+
String scope,
2223
// saas auth properies
2324
String region,
2425
String clusterId) {

0 commit comments

Comments
 (0)