mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-07-23 18:53:29 +00:00
Merge branch '6.4.x'
This commit is contained in:
commit
804d79d96a
@ -597,17 +597,11 @@ public class ClientRegistrationsTests {
|
|||||||
return new MockResponse().setResponseCode(responseCode);
|
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)
|
assertThatExceptionOfType(IllegalArgumentException.class)
|
||||||
.isThrownBy(() -> ClientRegistrations.fromIssuerLocation(this.issuer).build())
|
.isThrownBy(() -> ClientRegistrations.fromIssuerLocation(this.issuer).build())
|
||||||
.withMessage(message);
|
.withMessageContaining("405")
|
||||||
|
.withMessageContaining("400")
|
||||||
|
.withMessageContaining("404");
|
||||||
}
|
}
|
||||||
|
|
||||||
private ClientRegistration.Builder registration(String path) throws Exception {
|
private ClientRegistration.Builder registration(String path) throws Exception {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user