|
@@ -162,6 +162,13 @@ public class OidcProviderConfigurationTests {
|
|
);
|
|
);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @Test
|
|
|
|
+ public void loadContextWhenIssuerWithPathThenThrowException() {
|
|
|
|
+ assertThatThrownBy(
|
|
|
|
+ () -> this.spring.register(AuthorizationServerConfigurationWithIssuerPath.class).autowire()
|
|
|
|
+ );
|
|
|
|
+ }
|
|
|
|
+
|
|
@Test
|
|
@Test
|
|
public void loadContextWhenIssuerWithQueryThenThrowException() {
|
|
public void loadContextWhenIssuerWithQueryThenThrowException() {
|
|
assertThatThrownBy(
|
|
assertThatThrownBy(
|
|
@@ -183,6 +190,13 @@ public class OidcProviderConfigurationTests {
|
|
);
|
|
);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @Test
|
|
|
|
+ public void loadContextWhenIssuerWithEmptyPathThenThrowException() {
|
|
|
|
+ assertThatThrownBy(
|
|
|
|
+ () -> this.spring.register(AuthorizationServerConfigurationWithIssuerEmptyPath.class).autowire()
|
|
|
|
+ );
|
|
|
|
+ }
|
|
|
|
+
|
|
@Test
|
|
@Test
|
|
public void loadContextWhenIssuerWithEmptyQueryThenThrowException() {
|
|
public void loadContextWhenIssuerWithEmptyQueryThenThrowException() {
|
|
assertThatThrownBy(
|
|
assertThatThrownBy(
|
|
@@ -300,6 +314,15 @@ public class OidcProviderConfigurationTests {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @EnableWebSecurity
|
|
|
|
+ static class AuthorizationServerConfigurationWithIssuerPath extends AuthorizationServerConfiguration {
|
|
|
|
+
|
|
|
|
+ @Bean
|
|
|
|
+ AuthorizationServerSettings authorizationServerSettings() {
|
|
|
|
+ return AuthorizationServerSettings.builder().issuer(ISSUER_URL + "/issuer1").build();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
@EnableWebSecurity
|
|
@EnableWebSecurity
|
|
static class AuthorizationServerConfigurationWithIssuerQuery extends AuthorizationServerConfiguration {
|
|
static class AuthorizationServerConfigurationWithIssuerQuery extends AuthorizationServerConfiguration {
|
|
|
|
|
|
@@ -327,6 +350,15 @@ public class OidcProviderConfigurationTests {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @EnableWebSecurity
|
|
|
|
+ static class AuthorizationServerConfigurationWithIssuerEmptyPath extends AuthorizationServerConfiguration {
|
|
|
|
+
|
|
|
|
+ @Bean
|
|
|
|
+ AuthorizationServerSettings authorizationServerSettings() {
|
|
|
|
+ return AuthorizationServerSettings.builder().issuer(ISSUER_URL + "/").build();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
@EnableWebSecurity
|
|
@EnableWebSecurity
|
|
static class AuthorizationServerConfigurationWithIssuerEmptyQuery extends AuthorizationServerConfiguration {
|
|
static class AuthorizationServerConfigurationWithIssuerEmptyQuery extends AuthorizationServerConfiguration {
|
|
|
|
|