use of org.cloudfoundry.uaa.serverinformation.GetAutoLoginAuthenticationCodeResponse in project cf-java-client by cloudfoundry.
the class ReactorServerInformation method getAuthenticationCode.
@Override
public Mono<GetAutoLoginAuthenticationCodeResponse> getAuthenticationCode(GetAutoLoginAuthenticationCodeRequest request) {
return post(request, GetAutoLoginAuthenticationCodeResponse.class, builder -> builder.pathSegment("autologin"), outbound -> outbound.map(r -> {
String encoded = Base64.getEncoder().encodeToString(new AsciiString(request.getClientId()).concat(":").concat(request.getClientSecret()).toByteArray());
r.requestHeaders().set(AUTHORIZATION, BASIC_PREAMBLE + encoded);
return r;
})).checkpoint();
}
Aggregations