Skip to content

Commit e098533

Browse files
committed
Polish ReactiveCloudFoundrySecurityService
1 parent 3d4a9dd commit e098533

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/reactive/ReactiveCloudFoundrySecurityService.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,6 @@ class ReactiveCloudFoundrySecurityService {
5353

5454
private final String cloudControllerUrl;
5555

56-
private Mono<String> uaaUrl;
57-
5856
ReactiveCloudFoundrySecurityService(WebClient.Builder webClientBuilder, String cloudControllerUrl,
5957
boolean skipSslValidation) {
6058
Assert.notNull(webClientBuilder, "WebClient must not be null");
@@ -149,15 +147,14 @@ private Map<String, String> extractTokenKeys(Map<String, Object> response) {
149147
* @return the UAA url Mono
150148
*/
151149
Mono<String> getUaaUrl() {
152-
this.uaaUrl = this.webClient.get()
150+
return this.webClient.get()
153151
.uri(this.cloudControllerUrl + "/info")
154152
.retrieve()
155153
.bodyToMono(Map.class)
156154
.map((response) -> (String) response.get("token_endpoint"))
157155
.cache()
158156
.onErrorMap((ex) -> new CloudFoundryAuthorizationException(Reason.SERVICE_UNAVAILABLE,
159157
"Unable to fetch token keys from UAA."));
160-
return this.uaaUrl;
161158
}
162159

163160
}

0 commit comments

Comments
 (0)