Skip to content

Commit 90deeae

Browse files
Merge branch 'spring-projects:main' into main
2 parents e68c63c + 1a4602c commit 90deeae

File tree

17 files changed

+94
-84
lines changed

17 files changed

+94
-84
lines changed

.github/workflows/merge-dependabot-pr.yml

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

crypto/src/main/java/org/springframework/security/crypto/argon2/Argon2EncodingUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ static Argon2Hash decode(String encodedHash) throws IllegalArgumentException {
111111
case "argon2d" -> new Argon2Parameters.Builder(Argon2Parameters.ARGON2_d);
112112
case "argon2i" -> new Argon2Parameters.Builder(Argon2Parameters.ARGON2_i);
113113
case "argon2id" -> new Argon2Parameters.Builder(Argon2Parameters.ARGON2_id);
114-
default -> throw new IllegalArgumentException("Invalid algorithm type: " + parts[0]);
114+
default -> throw new IllegalArgumentException("Invalid algorithm type: " + parts[1]);
115115
};
116116
if (parts[currentPart].startsWith("v=")) {
117117
paramsBuilder.withVersion(Integer.parseInt(parts[currentPart].substring(2)));

crypto/src/test/java/org/springframework/security/crypto/argon2/Argon2EncodingUtilsTests.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,10 @@ public void decodeWhenNotAnArgon2HashThenThrowException() {
9494

9595
@Test
9696
public void decodeWhenNonexistingAlgorithmThenThrowException() {
97-
assertThatIllegalArgumentException().isThrownBy(() -> Argon2EncodingUtils
98-
.decode("$argon2x$v=19$m=1024,t=3,p=2$Y1JkRmJDdzIzZ3oyTWx4aw$cGE5Cbd/cx7micVhXVBdH5qTr66JI1iUyuNNVAnErXs"));
97+
assertThatIllegalArgumentException()
98+
.isThrownBy(() -> Argon2EncodingUtils.decode(
99+
"$argon2x$v=19$m=1024,t=3,p=2$Y1JkRmJDdzIzZ3oyTWx4aw$cGE5Cbd/cx7micVhXVBdH5qTr66JI1iUyuNNVAnErXs"))
100+
.withMessageContaining("argon2x");
99101
}
100102

101103
@Test

docs/modules/ROOT/pages/reactive/oauth2/resource-server/opaque-token.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ spring:
2828
security:
2929
oauth2:
3030
resourceserver:
31-
opaque-token:
31+
opaquetoken:
3232
introspection-uri: https://idp.example.com/introspect
3333
client-id: client
3434
client-secret: secret
@@ -622,7 +622,7 @@ spring:
622622
security:
623623
oauth2:
624624
resourceserver:
625-
opaque-token:
625+
opaquetoken:
626626
introspection-uri: https://idp.example.org/introspection
627627
client-id: client
628628
client-secret: secret

docs/modules/ROOT/pages/servlet/oauth2/resource-server/opaque-token.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ spring:
2727
security:
2828
oauth2:
2929
resourceserver:
30-
opaque-token:
30+
opaquetoken:
3131
introspection-uri: https://idp.example.com/introspect
3232
client-id: client
3333
client-secret: secret
@@ -791,7 +791,7 @@ spring:
791791
security:
792792
oauth2:
793793
resourceserver:
794-
opaque-token:
794+
opaquetoken:
795795
introspection-uri: https://idp.example.org/introspection
796796
client-id: client
797797
client-secret: secret

gradle/wrapper/gradle-wrapper.jar

59 Bytes
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionSha256Sum=20f1b1176237254a6fc204d8434196fa11a4cfb387567519c61556e8710aed78
4-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
3+
distributionSha256Sum=61ad310d3c7d3e5da131b76bbf22b5a4c0786e9d892dae8c1658d4b484de3caa
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip
55
networkTimeout=10000
66
validateDistributionUrl=true
77
zipStoreBase=GRADLE_USER_HOME

gradlew

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ case "$( uname )" in #(
114114
NONSTOP* ) nonstop=true ;;
115115
esac
116116

117-
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
117+
CLASSPATH="\\\"\\\""
118118

119119

120120
# Determine the Java command to use to start the JVM.
@@ -213,7 +213,7 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
213213
set -- \
214214
"-Dorg.gradle.appname=$APP_BASE_NAME" \
215215
-classpath "$CLASSPATH" \
216-
org.gradle.wrapper.GradleWrapperMain \
216+
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
217217
"$@"
218218

219219
# Stop when "xargs" is not available.

gradlew.bat

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,11 @@ goto fail
7070
:execute
7171
@rem Setup the command line
7272

73-
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73+
set CLASSPATH=
7474

7575

7676
@rem Execute Gradle
77-
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
77+
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
7878

7979
:end
8080
@rem End local scope for the variables with windows NT shell

oauth2/oauth2-client/src/main/java/org/springframework/security/oauth2/client/registration/ClientRegistrations.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2024 the original author or authors.
2+
* Copyright 2002-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -17,6 +17,7 @@
1717
package org.springframework.security.oauth2.client.registration;
1818

1919
import java.net.URI;
20+
import java.util.ArrayList;
2021
import java.util.LinkedHashMap;
2122
import java.util.List;
2223
import java.util.Map;
@@ -49,6 +50,7 @@
4950
* @author Rob Winch
5051
* @author Josh Cummings
5152
* @author Rafiullah Hamedy
53+
* @author Evgeniy Cheban
5254
* @since 5.1
5355
*/
5456
public final class ClientRegistrations {
@@ -265,6 +267,7 @@ private static Supplier<ClientRegistration.Builder> getRfc8414Builder(String iss
265267
private static ClientRegistration.Builder getBuilder(String issuer,
266268
Supplier<ClientRegistration.Builder>... suppliers) {
267269
String errorMessage = "Unable to resolve Configuration with the provided Issuer of \"" + issuer + "\"";
270+
List<String> errors = new ArrayList<>();
268271
for (Supplier<ClientRegistration.Builder> supplier : suppliers) {
269272
try {
270273
return supplier.get();
@@ -273,6 +276,7 @@ private static ClientRegistration.Builder getBuilder(String issuer,
273276
if (!ex.getStatusCode().is4xxClientError()) {
274277
throw ex;
275278
}
279+
errors.add(ex.getMessage());
276280
// else try another endpoint
277281
}
278282
catch (IllegalArgumentException | IllegalStateException ex) {
@@ -282,6 +286,9 @@ private static ClientRegistration.Builder getBuilder(String issuer,
282286
throw new IllegalArgumentException(errorMessage, ex);
283287
}
284288
}
289+
if (!errors.isEmpty()) {
290+
throw new IllegalArgumentException(errorMessage + ", errors: " + errors);
291+
}
285292
throw new IllegalArgumentException(errorMessage);
286293
}
287294

0 commit comments

Comments
 (0)