Skip to content
This repository was archived by the owner on May 28, 2024. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions src/main/java/com/kuflow/rest/client/KuFlowRestClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import com.fasterxml.jackson.datatype.jdk8.Jdk8Module;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
import com.kuflow.rest.client.controller.AuthenticationApi;
import com.kuflow.rest.client.controller.PrincipalApi;
import com.kuflow.rest.client.controller.ProcessApi;
import com.kuflow.rest.client.controller.TaskApi;
import com.kuflow.rest.client.feign.KuFlowFormEncoder;
Expand Down Expand Up @@ -41,6 +42,8 @@ public class KuFlowRestClient {

private final AuthenticationApi authenticationApi;

private final PrincipalApi principalApi;

private final ProcessApi processApi;

private final TaskApi taskApi;
Expand Down Expand Up @@ -89,6 +92,17 @@ public KuFlowRestClient(KuFlowRestClientProperties properties) {
.requestInterceptor(authRequestInterceptor)
.target(AuthenticationApi.class, properties.getEndpoint());

this.principalApi =
Feign
.builder()
.encoder(encoder)
.decoder(decoder)
.logger(new Slf4jLogger(PrincipalApi.class))
.logLevel(logLevel)
.options(options)
.requestInterceptor(authRequestInterceptor)
.target(PrincipalApi.class, properties.getEndpoint());

this.processApi =
Feign
.builder()
Expand Down Expand Up @@ -116,6 +130,10 @@ public AuthenticationApi getAuthenticationApi() {
return this.authenticationApi;
}

public PrincipalApi getPrincipalApi() {
return this.principalApi;
}

public ProcessApi getProcessApi() {
return this.processApi;
}
Expand Down