Skip to content

Commit e721021

Browse files
committed
Merge branch '1.1.x'
2 parents 068601b + 4fdd262 commit e721021

File tree

2 files changed

+1
-37
lines changed

2 files changed

+1
-37
lines changed

oauth2-authorization-server/src/main/java/org/springframework/security/oauth2/server/authorization/config/annotation/web/configurers/OAuth2AuthorizationServerConfigurer.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2020-2023 the original author or authors.
2+
* Copyright 2020-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -55,7 +55,6 @@
5555
import org.springframework.security.web.util.matcher.OrRequestMatcher;
5656
import org.springframework.security.web.util.matcher.RequestMatcher;
5757
import org.springframework.util.Assert;
58-
import org.springframework.util.StringUtils;
5958

6059
/**
6160
* An {@link AbstractHttpConfigurer} for OAuth 2.0 Authorization Server support.
@@ -388,9 +387,6 @@ private static void validateAuthorizationServerSettings(AuthorizationServerSetti
388387
} catch (Exception ex) {
389388
throw new IllegalArgumentException("issuer must be a valid URL", ex);
390389
}
391-
if (StringUtils.hasText(issuerUri.getPath())) {
392-
throw new IllegalArgumentException("Path component for issuer ('" + issuerUri.getPath() + "') is currently not supported");
393-
}
394390
// rfc8414 https://datatracker.ietf.org/doc/html/rfc8414#section-2
395391
if (issuerUri.getQuery() != null || issuerUri.getFragment() != null) {
396392
throw new IllegalArgumentException("issuer cannot contain query or fragment component");

oauth2-authorization-server/src/test/java/org/springframework/security/oauth2/server/authorization/config/annotation/web/configurers/OidcProviderConfigurationTests.java

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -163,13 +163,6 @@ public void loadContextWhenIssuerNotValidUriThenThrowException() {
163163
);
164164
}
165165

166-
@Test
167-
public void loadContextWhenIssuerWithPathThenThrowException() {
168-
assertThatThrownBy(
169-
() -> this.spring.register(AuthorizationServerConfigurationWithIssuerPath.class).autowire()
170-
);
171-
}
172-
173166
@Test
174167
public void loadContextWhenIssuerWithQueryThenThrowException() {
175168
assertThatThrownBy(
@@ -191,13 +184,6 @@ public void loadContextWhenIssuerWithQueryAndFragmentThenThrowException() {
191184
);
192185
}
193186

194-
@Test
195-
public void loadContextWhenIssuerWithEmptyPathThenThrowException() {
196-
assertThatThrownBy(
197-
() -> this.spring.register(AuthorizationServerConfigurationWithIssuerEmptyPath.class).autowire()
198-
);
199-
}
200-
201187
@Test
202188
public void loadContextWhenIssuerWithEmptyQueryThenThrowException() {
203189
assertThatThrownBy(
@@ -315,15 +301,6 @@ AuthorizationServerSettings authorizationServerSettings() {
315301
}
316302
}
317303

318-
@EnableWebSecurity
319-
static class AuthorizationServerConfigurationWithIssuerPath extends AuthorizationServerConfiguration {
320-
321-
@Bean
322-
AuthorizationServerSettings authorizationServerSettings() {
323-
return AuthorizationServerSettings.builder().issuer(ISSUER_URL + "/issuer1").build();
324-
}
325-
}
326-
327304
@EnableWebSecurity
328305
static class AuthorizationServerConfigurationWithIssuerQuery extends AuthorizationServerConfiguration {
329306

@@ -351,15 +328,6 @@ AuthorizationServerSettings authorizationServerSettings() {
351328
}
352329
}
353330

354-
@EnableWebSecurity
355-
static class AuthorizationServerConfigurationWithIssuerEmptyPath extends AuthorizationServerConfiguration {
356-
357-
@Bean
358-
AuthorizationServerSettings authorizationServerSettings() {
359-
return AuthorizationServerSettings.builder().issuer(ISSUER_URL + "/").build();
360-
}
361-
}
362-
363331
@EnableWebSecurity
364332
static class AuthorizationServerConfigurationWithIssuerEmptyQuery extends AuthorizationServerConfiguration {
365333

0 commit comments

Comments
 (0)