Skip to content

Commit c8e87a8

Browse files
committed
Merge branch '754-property-doc'
2 parents aacbadd + c3045d8 commit c8e87a8

File tree

8 files changed

+40
-7
lines changed

8 files changed

+40
-7
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ Name | Description
277277
`TEST_ADMIN_CLIENTSECRET` | Client secret for a client with permissions for a Client Credentials grant
278278
`TEST_ADMIN_PASSWORD` | Password for a user with admin permissions
279279
`TEST_ADMIN_USERNAME` | Username for a user with admin permissions
280-
`TEST_APIHOST` | The host of Cloud Foundry instance. Typically something like `api.local.pcfdev.io`.
280+
`TEST_APIHOST` | The host of a Cloud Foundry instance. Typically something like `api.local.pcfdev.io`.
281281
`TEST_PROXY_HOST` | _(Optional)_ The host of a proxy to route all requests through
282282
`TEST_PROXY_PASSWORD` | _(Optional)_ The password for a proxy to route all requests through
283283
`TEST_PROXY_PORT` | _(Optional)_ The port of a proxy to route all requests through. Defaults to `8080`.

cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/_DefaultConnectionContext.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,9 @@ public ObjectMapper getObjectMapper() {
120120
return objectMapper;
121121
}
122122

123+
/**
124+
* The port for the Cloud Foundry instance
125+
*/
123126
@Value.Default
124127
public Integer getPort() {
125128
return DEFAULT_PORT;

cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/_ReactorCloudFoundryClient.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,13 +323,19 @@ public Users users() {
323323
return new ReactorUsers(getConnectionContext(), getRoot(), getTokenProvider());
324324
}
325325

326+
/**
327+
* The connection context
328+
*/
326329
abstract ConnectionContext getConnectionContext();
327330

328331
@Value.Default
329332
Mono<String> getRoot() {
330333
return getConnectionContext().getRoot();
331334
}
332335

336+
/**
337+
* The token provider
338+
*/
333339
abstract TokenProvider getTokenProvider();
334340

335341
}

cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/doppler/_ReactorDopplerClient.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ public Flux<Envelope> stream(StreamRequest request) {
5454
return getDopplerEndpoints().stream(request);
5555
}
5656

57+
/**
58+
* The connection context
59+
*/
5760
abstract ConnectionContext getConnectionContext();
5861

5962
@Value.Derived
@@ -66,6 +69,9 @@ Mono<String> getRoot() {
6669
return getConnectionContext().getRoot("doppler_logging_endpoint");
6770
}
6871

72+
/**
73+
* The token provider
74+
*/
6975
abstract TokenProvider getTokenProvider();
7076

7177

cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/routing/_ReactorRoutingClient.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,19 @@ public TcpRoutes tcpRoutes() {
4545
return new ReactorTcpRoutes(getConnectionContext(), getRoot(), getTokenProvider());
4646
}
4747

48+
/**
49+
* The connection context
50+
*/
4851
abstract ConnectionContext getConnectionContext();
4952

5053
@Value.Default
5154
Mono<String> getRoot() {
5255
return getConnectionContext().getRoot("routing_endpoint");
5356
}
5457

58+
/**
59+
* The token provider
60+
*/
5561
abstract TokenProvider getTokenProvider();
5662

5763
}

cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/tokenprovider/AbstractUaaTokenProvider.java

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import io.jsonwebtoken.Claims;
2020
import io.jsonwebtoken.Jwts;
2121
import io.netty.util.AsciiString;
22+
import org.cloudfoundry.Nullable;
2223
import org.cloudfoundry.reactor.ConnectionContext;
2324
import org.cloudfoundry.reactor.TokenProvider;
2425
import org.cloudfoundry.reactor.util.ErrorPayloadMapper;
@@ -78,15 +79,15 @@ public abstract class AbstractUaaTokenProvider implements TokenProvider {
7879
private final ConcurrentMap<ConnectionContext, Mono<String>> refreshTokens = new ConcurrentHashMap<>(1);
7980

8081
/**
81-
* The client id. Defaults to {@code cf}.
82+
* The client id. Defaults to {@code cf}.
8283
*/
8384
@Value.Default
8485
public String getClientId() {
8586
return "cf";
8687
}
8788

8889
/**
89-
* The client secret Defaults to {@code ""}.
90+
* The client secret. Defaults to {@code ""}.
9091
*/
9192
@Value.Default
9293
public String getClientSecret() {
@@ -113,7 +114,11 @@ public void invalidate(ConnectionContext connectionContext) {
113114
this.accessTokens.put(connectionContext, token(connectionContext));
114115
}
115116

116-
abstract Optional<String> identityZoneId();
117+
/**
118+
* The identity zone id
119+
*/
120+
@Nullable
121+
abstract String identityZoneId();
117122

118123
/**
119124
* Transforms a {@code Mono} in order to make a request to negotiate an access token
@@ -154,10 +159,12 @@ private static String extractAccessToken(Map<String, String> payload) {
154159
return String.format("%s %s", payload.get(TOKEN_TYPE), accessToken);
155160
}
156161

157-
private static String getTokenUri(String root, Optional<String> identityZoneId) {
162+
private static String getTokenUri(String root, String identityZoneId) {
158163
UriComponentsBuilder builder = UriComponentsBuilder.fromUriString(root);
159164

160-
identityZoneId.ifPresent(id -> builder.host(String.format("%s.%s", id, builder.build().getHost())));
165+
if (identityZoneId != null) {
166+
builder.host(String.format("%s.%s", identityZoneId, builder.build().getHost()));
167+
}
161168

162169
return builder
163170
.pathSegment("oauth", "token")

cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/tokenprovider/_OneTimePasscodeTokenProvider.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
@Value.Immutable
2828
abstract class _OneTimePasscodeTokenProvider extends AbstractUaaTokenProvider {
2929

30-
3130
/**
3231
* The passcode
3332
*/

cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/uaa/_ReactorUaaClient.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,9 @@ public Users users() {
9494
return new ReactorUsers(getConnectionContext(), getRoot(), getTokenProvider());
9595
}
9696

97+
/**
98+
* The connection context
99+
*/
97100
abstract ConnectionContext getConnectionContext();
98101

99102
@Value.Default
@@ -103,6 +106,9 @@ Mono<String> getRoot() {
103106
.cache();
104107
}
105108

109+
/**
110+
* The token provider
111+
*/
106112
abstract TokenProvider getTokenProvider();
107113

108114
@Value.Default

0 commit comments

Comments
 (0)