OidcConfigurationProvider improve invalid issuer error

Issue: gh-5355
This commit is contained in:
Rob Winch
2018-05-18 11:21:45 -05:00
parent 18c8af8f0d
commit db889973a8
2 changed files with 15 additions and 2 deletions

View File

@@ -202,6 +202,12 @@ public class OidcConfigurationProviderTests {
.hasMessageContaining("Only ClientAuthenticationMethod.BASIC and ClientAuthenticationMethod.POST are supported. The issuer \"" + this.issuer + "\" returned a configuration of [tls_client_auth]");
}
@Test
public void issuerWhenEmptyStringThenMeaningfulErrorMessage() {
assertThatThrownBy(() -> OidcConfigurationProvider.issuer(""))
.hasMessageContaining("Unable to resolve the OpenID Configuration with the provided Issuer of \"\"");
}
private ClientRegistration registration(String path) throws Exception {
String body = this.mapper.writeValueAsString(this.response);
MockResponse mockResponse = new MockResponse()