Skip to content

Commit 4fdd262

Browse files
committed
Merge branch '1.0.x' into 1.1.x
2 parents e3bf93c + 8d426f9 commit 4fdd262

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
@@ -162,13 +162,6 @@ public void loadContextWhenIssuerNotValidUriThenThrowException() {
162162
);
163163
}
164164

165-
@Test
166-
public void loadContextWhenIssuerWithPathThenThrowException() {
167-
assertThatThrownBy(
168-
() -> this.spring.register(AuthorizationServerConfigurationWithIssuerPath.class).autowire()
169-
);
170-
}
171-
172165
@Test
173166
public void loadContextWhenIssuerWithQueryThenThrowException() {
174167
assertThatThrownBy(
@@ -190,13 +183,6 @@ public void loadContextWhenIssuerWithQueryAndFragmentThenThrowException() {
190183
);
191184
}
192185

193-
@Test
194-
public void loadContextWhenIssuerWithEmptyPathThenThrowException() {
195-
assertThatThrownBy(
196-
() -> this.spring.register(AuthorizationServerConfigurationWithIssuerEmptyPath.class).autowire()
197-
);
198-
}
199-
200186
@Test
201187
public void loadContextWhenIssuerWithEmptyQueryThenThrowException() {
202188
assertThatThrownBy(
@@ -314,15 +300,6 @@ AuthorizationServerSettings authorizationServerSettings() {
314300
}
315301
}
316302

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

@@ -350,15 +327,6 @@ AuthorizationServerSettings authorizationServerSettings() {
350327
}
351328
}
352329

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

0 commit comments

Comments
 (0)