Browse Source

Merge branch '6.3.x' into 6.4.x

pull/17042/head
Josh Cummings 8 months ago
parent
commit
a4126aa27d
No known key found for this signature in database
GPG Key ID: 869B37A20E876129
  1. 12
      oauth2/oauth2-client/src/test/java/org/springframework/security/oauth2/client/registration/ClientRegistrationsTests.java

12
oauth2/oauth2-client/src/test/java/org/springframework/security/oauth2/client/registration/ClientRegistrationsTests.java

@ -585,17 +585,11 @@ public class ClientRegistrationsTests { @@ -585,17 +585,11 @@ public class ClientRegistrationsTests {
return new MockResponse().setResponseCode(responseCode);
}
});
String message = """
Unable to resolve Configuration with the provided Issuer of "%s", errors: [\
405 Client Error on GET request for "%s": [no body], \
400 Client Error on GET request for "%s": [no body], \
404 Client Error on GET request for "%s": [no body]]\
""".formatted(this.issuer, this.server.url("/issuer1/.well-known/openid-configuration"),
this.server.url("/.well-known/openid-configuration/issuer1"),
this.server.url("/.well-known/oauth-authorization-server/issuer1"));
assertThatExceptionOfType(IllegalArgumentException.class)
.isThrownBy(() -> ClientRegistrations.fromIssuerLocation(this.issuer).build())
.withMessage(message);
.withMessageContaining("405")
.withMessageContaining("400")
.withMessageContaining("404");
}
private ClientRegistration.Builder registration(String path) throws Exception {

Loading…
Cancel
Save