camunda-community-hub / camunda-platform-7-rest-client-java

Community extension to generate a Java client from the provided Camunda 7 OpenAPI descitpion and also warp it into Spring Boot
Apache License 2.0
57 stars 10 forks source link

Missing credentials on rest client #145

Closed hauch closed 2 months ago

hauch commented 2 months ago

CamundaOpenApiStarter generates an ApiClient with basepath only. Using this together with camunda-engine-rest-client-complete-springboot-starter fails on deployment if the rest-engine is protected.

It should be possible to add basic credentials (like in the external task client).

hauch commented 2 months ago

I suggest to add these properties private final String username; private final String password;

add this to the constructor @Value("${camunda.bpm.client.basic-auth.username:#{null}}") String username @Value("${camunda.bpm.client.basic-auth.password:#{null}}") String password

and this to createApiClient(): client.setUsername(this.username); client.setPassword(this.password);