Skip to content

Commit 193bf3c

Browse files
tea-onejonathanlukas
authored andcommitted
feat: add oauth scope (for entra id) (#110)
(cherry picked from commit 40138fc)
1 parent 1a38195 commit 193bf3c

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
@@ -78,6 +78,7 @@ private HttpPost buildRequest() throws URISyntaxException {
7878
formParams.add(new BasicNameValuePair("client_id", jwtCredential.clientId()));
7979
formParams.add(new BasicNameValuePair("client_secret", jwtCredential.clientSecret()));
8080
formParams.add(new BasicNameValuePair("audience", jwtCredential.audience()));
81+
formParams.add(new BasicNameValuePair("scope", jwtCredential.scope()));
8182
httpPost.setEntity(new UrlEncodedFormEntity(formParams));
8283
return httpPost;
8384
}

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
@@ -81,7 +81,8 @@ public Authentication authentication() {
8181
properties.clientId(),
8282
properties.clientSecret(),
8383
properties.audience(),
84-
properties.authUrl()),
84+
properties.authUrl(),
85+
properties.scope()),
8586
new JacksonTokenResponseMapper(objectMapper));
8687
}
8788
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)