Polish ReactiveCloudFoundrySecurityService

This commit is contained in:
Moritz Halbritter
2023-10-31 09:56:35 +01:00
parent 3d4a9dd059
commit e0985331c0

View File

@@ -53,8 +53,6 @@ class ReactiveCloudFoundrySecurityService {
private final String cloudControllerUrl;
private Mono<String> uaaUrl;
ReactiveCloudFoundrySecurityService(WebClient.Builder webClientBuilder, String cloudControllerUrl,
boolean skipSslValidation) {
Assert.notNull(webClientBuilder, "WebClient must not be null");
@@ -149,7 +147,7 @@ class ReactiveCloudFoundrySecurityService {
* @return the UAA url Mono
*/
Mono<String> getUaaUrl() {
this.uaaUrl = this.webClient.get()
return this.webClient.get()
.uri(this.cloudControllerUrl + "/info")
.retrieve()
.bodyToMono(Map.class)
@@ -157,7 +155,6 @@ class ReactiveCloudFoundrySecurityService {
.cache()
.onErrorMap((ex) -> new CloudFoundryAuthorizationException(Reason.SERVICE_UNAVAILABLE,
"Unable to fetch token keys from UAA."));
return this.uaaUrl;
}
}