Fix expected @Transient Authentication at provider configuration endpoint

Closes gh-632
This commit is contained in:
Joe Grandja
2022-03-22 13:45:57 -04:00
parent c2db8926df
commit ccf4a2de6e
3 changed files with 81 additions and 25 deletions

View File

@@ -186,6 +186,16 @@ public class OidcTests {
.andExpect(jsonPath("issuer").value(ISSUER_URL));
}
// gh-632
@Test
public void requestWhenConfigurationRequestAndUserAuthenticatedThenReturnConfigurationResponse() throws Exception {
this.spring.register(AuthorizationServerConfiguration.class).autowire();
this.mvc.perform(get(DEFAULT_OIDC_PROVIDER_CONFIGURATION_ENDPOINT_URI)
.with(user("user")))
.andExpect(status().is2xxSuccessful());
}
@Test
public void loadContextWhenIssuerNotValidUrlThenThrowException() {
assertThatThrownBy(