Skip to content

Commit 00f7096

Browse files
authored
Merge branch 'cloudfoundry:main' into fix-manifest
2 parents 8117875 + 5216e50 commit 00f7096

File tree

90 files changed

+1430
-1016
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+1430
-1016
lines changed

.github/workflows/ci-java-17-and-21.yml

Lines changed: 0 additions & 34 deletions
This file was deleted.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ubuntu-latest
1414
strategy:
1515
matrix:
16-
java: [ 8, 11 ]
16+
java: [ 8, 11, 17, 21 ]
1717
name: Java ${{ matrix.java }} build
1818
steps:
1919
- uses: actions/checkout@v4

.mvn/wrapper/MavenWrapperDownloader.java

Lines changed: 0 additions & 117 deletions
This file was deleted.

.mvn/wrapper/maven-wrapper.jar

-49.5 KB
Binary file not shown.
Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,19 @@
1-
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.1/apache-maven-3.6.1-bin.zip
2-
wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
wrapperVersion=3.3.2
18+
distributionType=only-script
19+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ Lastly before running the tests, it is strongly recommended that you take a snap
312312
## License
313313
This project is released under version 2.0 of the [Apache License][l].
314314

315-
[a]: https://apidocs.cloudfoundry.org/latest-release/
315+
[a]: https://apidocs.cloudfoundry.org/
316316
[c]: https://github.com/cloudfoundry/cli
317317
[e]: https://github.com/cloudfoundry/java-client/issues
318318
[g]: https://gradle.org

cloudfoundry-client-reactor/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<parent>
2626
<groupId>org.cloudfoundry</groupId>
2727
<artifactId>cloudfoundry-java-client</artifactId>
28-
<version>5.13.0.BUILD-SNAPSHOT</version>
28+
<version>5.14.0.BUILD-SNAPSHOT</version>
2929
</parent>
3030

3131
<artifactId>cloudfoundry-client-reactor</artifactId>

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

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
import io.jsonwebtoken.JwtParser;
2626
import io.jsonwebtoken.Jwts;
2727
import io.netty.handler.codec.http.HttpHeaders;
28-
import io.netty.handler.codec.http.HttpResponseStatus;
2928
import io.netty.util.AsciiString;
3029
import java.time.LocalDateTime;
3130
import java.time.ZoneId;
@@ -46,7 +45,6 @@
4645
import org.cloudfoundry.reactor.util.Operator;
4746
import org.cloudfoundry.reactor.util.OperatorContext;
4847
import org.cloudfoundry.reactor.util.UserAgent;
49-
import org.cloudfoundry.uaa.UaaException;
5048
import org.immutables.value.Value;
5149
import org.slf4j.Logger;
5250
import org.slf4j.LoggerFactory;
@@ -163,7 +161,7 @@ private static Optional<Claims> parseToken(String token) {
163161

164162
try {
165163
String jws = token.substring(0, token.lastIndexOf('.') + 1);
166-
JwtParser parser = Jwts.parserBuilder().build();
164+
JwtParser parser = Jwts.parser().build();
167165

168166
return Optional.of(parser.parseClaimsJwt(jws).getBody());
169167
} catch (Exception e) {
@@ -253,12 +251,8 @@ private Mono<String> refreshToken(ConnectionContext connectionContext, String re
253251
connectionContext,
254252
refreshTokenGrantTokenRequestTransformer(refreshToken),
255253
tokensExtractor(connectionContext))
256-
.onErrorResume(
257-
t ->
258-
t instanceof UaaException
259-
&& ((UaaException) t).getStatusCode()
260-
== HttpResponseStatus.UNAUTHORIZED.code(),
261-
t -> Mono.empty());
254+
.doOnError(t -> LOGGER.error("Refresh token grant error.", t))
255+
.onErrorResume(t -> Mono.empty());
262256
}
263257

264258
private BiConsumer<HttpClientRequest, HttpClientForm> refreshTokenGrantTokenRequestTransformer(

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ public Key resolveSigningKey(JwsHeader header, Claims claims) {
5858

5959
@Override
6060
@SuppressWarnings("rawtypes")
61-
public Key resolveSigningKey(JwsHeader header, String plaintext) {
62-
return getKey(header.getKeyId());
61+
public Key resolveSigningKey(JwsHeader jwsHeader, byte[] bytes) {
62+
return getKey(jwsHeader.getKeyId());
6363
}
6464

6565
private static byte[] decode(TokenKey tokenKey) {

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,7 @@ private static Mono<String> getToken(
7272
}
7373

7474
private String getUsername(String token) {
75-
JwtParser parser =
76-
Jwts.parserBuilder().setSigningKeyResolver(this.signingKeyResolver).build();
75+
JwtParser parser = Jwts.parser().setSigningKeyResolver(this.signingKeyResolver).build();
7776

7877
Jws<Claims> jws = parser.parseClaimsJws(token);
7978

0 commit comments

Comments
 (0)