瀏覽代碼

Merge branch '6.0.x' into 6.1.x

Closes gh-13498
Josh Cummings 2 年之前
父節點
當前提交
8642a170e8

+ 2 - 1
oauth2/oauth2-client/src/main/java/org/springframework/security/oauth2/client/endpoint/AbstractWebClientReactiveOAuth2AccessTokenResponseClient.java

@@ -115,7 +115,8 @@ public abstract class AbstractWebClientReactiveOAuth2AccessTokenResponseClient<T
 		if (!supportedClientAuthenticationMethod) {
 		if (!supportedClientAuthenticationMethod) {
 			throw new IllegalArgumentException(String.format(
 			throw new IllegalArgumentException(String.format(
 					"This class supports `client_secret_basic`, `client_secret_post`, and `none` by default. Client [%s] is using [%s] instead. Please use a supported client authentication method, or use `set/addParametersConverter` or `set/addHeadersConverter` to supply an instance that supports [%s].",
 					"This class supports `client_secret_basic`, `client_secret_post`, and `none` by default. Client [%s] is using [%s] instead. Please use a supported client authentication method, or use `set/addParametersConverter` or `set/addHeadersConverter` to supply an instance that supports [%s].",
-					clientRegistration.getRegistrationId(), clientAuthenticationMethod, clientAuthenticationMethod));
+					clientRegistration.getRegistrationId(), clientAuthenticationMethod.getValue(),
+					clientAuthenticationMethod.getValue()));
 		}
 		}
 	}
 	}
 
 

+ 1 - 1
oauth2/oauth2-client/src/main/java/org/springframework/security/oauth2/client/endpoint/ClientAuthenticationMethodValidatingRequestEntityConverter.java

@@ -41,7 +41,7 @@ class ClientAuthenticationMethodValidatingRequestEntityConverter<T extends Abstr
 				|| clientAuthenticationMethod.equals(ClientAuthenticationMethod.CLIENT_SECRET_POST);
 				|| clientAuthenticationMethod.equals(ClientAuthenticationMethod.CLIENT_SECRET_POST);
 		Assert.isTrue(supportedClientAuthenticationMethod, () -> String.format(
 		Assert.isTrue(supportedClientAuthenticationMethod, () -> String.format(
 				"This class supports `client_secret_basic`, `client_secret_post`, and `none` by default. Client [%s] is using [%s] instead. Please use a supported client authentication method, or use `setRequestEntityConverter` to supply an instance that supports [%s].",
 				"This class supports `client_secret_basic`, `client_secret_post`, and `none` by default. Client [%s] is using [%s] instead. Please use a supported client authentication method, or use `setRequestEntityConverter` to supply an instance that supports [%s].",
-				registrationId, clientAuthenticationMethod, clientAuthenticationMethod));
+				registrationId, clientAuthenticationMethod.getValue(), clientAuthenticationMethod.getValue()));
 		return this.delegate.convert(grantRequest);
 		return this.delegate.convert(grantRequest);
 	}
 	}