Skip to content

Commit 0c2c7ba

Browse files
check if scope is null or empty (#111) (#113)
(cherry picked from commit 1ef7627)
1 parent 21f8ea7 commit 0c2c7ba

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,9 @@ 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()));
81+
if (jwtCredential.scope() != null && !jwtCredential.scope().isEmpty()) {
82+
formParams.add(new BasicNameValuePair("scope", jwtCredential.scope()));
83+
}
8284
httpPost.setEntity(new UrlEncodedFormEntity(formParams));
8385
return httpPost;
8486
}

0 commit comments

Comments
 (0)