@@ -213,35 +213,35 @@ public void loadContextWhenIssuerNotValidUriThenThrowException() {
213
213
@ Test
214
214
public void loadContextWhenIssuerWithQueryThenThrowException () {
215
215
assertThatThrownBy (
216
- () -> this .spring .register (AuthorizationServerConfigurationWithInvalidQueryIssuerUrl .class ).autowire ()
216
+ () -> this .spring .register (AuthorizationServerConfigurationWithIssuerQuery .class ).autowire ()
217
217
);
218
218
}
219
219
220
220
@ Test
221
221
public void loadContextWhenIssuerWithFragmentThenThrowException () {
222
222
assertThatThrownBy (
223
- () -> this .spring .register (AuthorizationServerConfigurationWithInvalidFragmentIssuerUrl .class ).autowire ()
223
+ () -> this .spring .register (AuthorizationServerConfigurationWithIssuerFragment .class ).autowire ()
224
224
);
225
225
}
226
226
227
227
@ Test
228
228
public void loadContextWhenIssuerWithQueryAndFragmentThenThrowException () {
229
229
assertThatThrownBy (
230
- () -> this .spring .register (AuthorizationServerConfigurationWithInvalidQueryAndFragmentIssuerUrl .class ).autowire ()
230
+ () -> this .spring .register (AuthorizationServerConfigurationWithIssuerQueryAndFragment .class ).autowire ()
231
231
);
232
232
}
233
233
234
234
@ Test
235
- public void loadContextWhenIssuerEndWithQuestionMarkCharacterThenThrowException () {
235
+ public void loadContextWhenIssuerWithEmptyQueryThenThrowException () {
236
236
assertThatThrownBy (
237
- () -> this .spring .register (AuthorizationServerConfigurationWithInvalidIssuerUrlEndWithQuestionMarkCharacter .class ).autowire ()
237
+ () -> this .spring .register (AuthorizationServerConfigurationWithIssuerEmptyQuery .class ).autowire ()
238
238
);
239
239
}
240
240
241
241
@ Test
242
- public void loadContextWhenIssuerEndWithNumberSignCharacterThenThrowException () {
242
+ public void loadContextWhenIssuerWithEmptyFragmentThenThrowException () {
243
243
assertThatThrownBy (
244
- () -> this .spring .register (AuthorizationServerConfigurationWithInvalidIssuerUrlEndWithNumberSignCharacter .class ).autowire ()
244
+ () -> this .spring .register (AuthorizationServerConfigurationWithIssuerEmptyFragment .class ).autowire ()
245
245
);
246
246
}
247
247
@@ -496,51 +496,51 @@ ProviderSettings providerSettings() {
496
496
497
497
@ EnableWebSecurity
498
498
@ Import (OAuth2AuthorizationServerConfiguration .class )
499
- static class AuthorizationServerConfigurationWithInvalidQueryIssuerUrl extends AuthorizationServerConfiguration {
499
+ static class AuthorizationServerConfigurationWithIssuerQuery extends AuthorizationServerConfiguration {
500
500
501
501
@ Bean
502
502
ProviderSettings providerSettings () {
503
- return ProviderSettings .builder ().issuer ("https://localhost:9000?something=any " ).build ();
503
+ return ProviderSettings .builder ().issuer (ISSUER_URL + "?param=value " ).build ();
504
504
}
505
505
}
506
506
507
507
@ EnableWebSecurity
508
508
@ Import (OAuth2AuthorizationServerConfiguration .class )
509
- static class AuthorizationServerConfigurationWithInvalidFragmentIssuerUrl extends AuthorizationServerConfiguration {
509
+ static class AuthorizationServerConfigurationWithIssuerFragment extends AuthorizationServerConfiguration {
510
510
511
511
@ Bean
512
512
ProviderSettings providerSettings () {
513
- return ProviderSettings .builder ().issuer ("https://localhost:9000 #fragment" ).build ();
513
+ return ProviderSettings .builder ().issuer (ISSUER_URL + " #fragment" ).build ();
514
514
}
515
515
}
516
516
517
517
@ EnableWebSecurity
518
518
@ Import (OAuth2AuthorizationServerConfiguration .class )
519
- static class AuthorizationServerConfigurationWithInvalidQueryAndFragmentIssuerUrl extends AuthorizationServerConfiguration {
519
+ static class AuthorizationServerConfigurationWithIssuerQueryAndFragment extends AuthorizationServerConfiguration {
520
520
521
521
@ Bean
522
522
ProviderSettings providerSettings () {
523
- return ProviderSettings .builder ().issuer ("https://localhost:9000?something=any #fragment" ).build ();
523
+ return ProviderSettings .builder ().issuer (ISSUER_URL + "?param=value #fragment" ).build ();
524
524
}
525
525
}
526
526
527
527
@ EnableWebSecurity
528
528
@ Import (OAuth2AuthorizationServerConfiguration .class )
529
- static class AuthorizationServerConfigurationWithInvalidIssuerUrlEndWithQuestionMarkCharacter extends AuthorizationServerConfiguration {
529
+ static class AuthorizationServerConfigurationWithIssuerEmptyQuery extends AuthorizationServerConfiguration {
530
530
531
531
@ Bean
532
532
ProviderSettings providerSettings () {
533
- return ProviderSettings .builder ().issuer ("https://localhost:9000 ?" ).build ();
533
+ return ProviderSettings .builder ().issuer (ISSUER_URL + " ?" ).build ();
534
534
}
535
535
}
536
536
537
537
@ EnableWebSecurity
538
538
@ Import (OAuth2AuthorizationServerConfiguration .class )
539
- static class AuthorizationServerConfigurationWithInvalidIssuerUrlEndWithNumberSignCharacter extends AuthorizationServerConfiguration {
539
+ static class AuthorizationServerConfigurationWithIssuerEmptyFragment extends AuthorizationServerConfiguration {
540
540
541
541
@ Bean
542
542
ProviderSettings providerSettings () {
543
- return ProviderSettings .builder ().issuer ("https://localhost:9000/ #" ).build ();
543
+ return ProviderSettings .builder ().issuer (ISSUER_URL + " #" ).build ();
544
544
}
545
545
}
546
546
0 commit comments