diff --git a/camunda-sdk-java/java-common/src/main/java/io/camunda/common/auth/SaaSAuthentication.java b/camunda-sdk-java/java-common/src/main/java/io/camunda/common/auth/SaaSAuthentication.java index 8fa3c495e..133a24614 100644 --- a/camunda-sdk-java/java-common/src/main/java/io/camunda/common/auth/SaaSAuthentication.java +++ b/camunda-sdk-java/java-common/src/main/java/io/camunda/common/auth/SaaSAuthentication.java @@ -55,7 +55,7 @@ private String retrieveToken(Product product, JwtCredential jwtCredential) { TokenResponse tokenResponse = jsonMapper.fromJson(EntityUtils.toString(response.getEntity()), TokenResponse.class); tokens.put(product, tokenResponse.getAccessToken()); } catch (Exception e) { - LOG.warn("Authenticating for " + product + " failed due to " + e); + LOG.error("Authenticating for " + product + " failed due to " + e); throw new RuntimeException("Unable to authenticate", e); } return tokens.get(product); diff --git a/camunda-sdk-java/java-common/src/main/java/io/camunda/common/auth/SelfManagedAuthentication.java b/camunda-sdk-java/java-common/src/main/java/io/camunda/common/auth/SelfManagedAuthentication.java index 02fb10c46..8e0f4b07b 100644 --- a/camunda-sdk-java/java-common/src/main/java/io/camunda/common/auth/SelfManagedAuthentication.java +++ b/camunda-sdk-java/java-common/src/main/java/io/camunda/common/auth/SelfManagedAuthentication.java @@ -88,7 +88,7 @@ private String retrieveToken(Product product, JwtCredential jwtCredential) { TokenResponse tokenResponse = jsonMapper.fromJson(EntityUtils.toString(response.getEntity()), TokenResponse.class); tokens.put(product, tokenResponse.getAccessToken()); } catch (Exception e) { - LOG.warn("Authenticating for " + product + " failed due to " + e); + LOG.error("Authenticating for " + product + " failed due to " + e); throw new RuntimeException("Unable to authenticate", e); } return tokens.get(product); diff --git a/camunda-sdk-java/java-common/src/main/java/io/camunda/common/auth/SimpleAuthentication.java b/camunda-sdk-java/java-common/src/main/java/io/camunda/common/auth/SimpleAuthentication.java index 706adfa21..f6d9ed8e3 100644 --- a/camunda-sdk-java/java-common/src/main/java/io/camunda/common/auth/SimpleAuthentication.java +++ b/camunda-sdk-java/java-common/src/main/java/io/camunda/common/auth/SimpleAuthentication.java @@ -47,8 +47,7 @@ public Authentication build() { private void retrieveToken(Product product, SimpleCredential simpleCredential) { try { HttpPost httpPost = new HttpPost(authUrl); - httpPost.addHeader("Content-Type", "application/json"); - List params = new ArrayList(); + List params = new ArrayList<>(); params.add(new BasicNameValuePair("username", simpleCredential.user)); params.add(new BasicNameValuePair("password", simpleCredential.password)); httpPost.setEntity(new UrlEncodedFormEntity(params)); @@ -58,14 +57,14 @@ private void retrieveToken(Product product, SimpleCredential simpleCredential) { String cookie = response.getHeader("Set-Cookie").getValue(); tokens.put(product, cookie); } catch (Exception e) { - LOG.warn("Authenticating for " + product + " failed due to " + e); - throw new RuntimeException("Unable to authenticate"); + LOG.error("Authenticating for " + product + " failed due to " + e); + throw new RuntimeException("Unable to authenticate", e); } } @Override public Map.Entry getTokenHeader(Product product) { - return new AbstractMap.SimpleEntry<>("Authorization", "Cookie " + tokens.get(product)); + return new AbstractMap.SimpleEntry<>("Cookie", tokens.get(product)); } } diff --git a/spring-boot-starter-camunda/src/main/java/io/camunda/zeebe/spring/client/configuration/OperateClientConfiguration.java b/spring-boot-starter-camunda/src/main/java/io/camunda/zeebe/spring/client/configuration/OperateClientConfiguration.java index 79aeb804c..d4c3a30bd 100644 --- a/spring-boot-starter-camunda/src/main/java/io/camunda/zeebe/spring/client/configuration/OperateClientConfiguration.java +++ b/spring-boot-starter-camunda/src/main/java/io/camunda/zeebe/spring/client/configuration/OperateClientConfiguration.java @@ -31,7 +31,6 @@ public class OperateClientConfiguration { @Bean @ConditionalOnMissingBean public CamundaOperateClient camundaOperateClient(OperateClientConfigurationProperties props) { - LOG.warn("Using a deprecated operate properties"); CamundaOperateClient client; try { client = new CamundaOperateClientBuilder()