Skip to content

Commit 8d426f9

Browse files
committed
Merge branch '0.4.x' into 1.0.x
2 parents 6544119 + 30d6129 commit 8d426f9

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.
@@ -48,7 +48,6 @@
4848
import org.springframework.security.web.util.matcher.OrRequestMatcher;
4949
import org.springframework.security.web.util.matcher.RequestMatcher;
5050
import org.springframework.util.Assert;
51-
import org.springframework.util.StringUtils;
5251

5352
/**
5453
* An {@link AbstractHttpConfigurer} for OAuth 2.0 Authorization Server support.
@@ -332,9 +331,6 @@ private static void validateAuthorizationServerSettings(AuthorizationServerSetti
332331
} catch (Exception ex) {
333332
throw new IllegalArgumentException("issuer must be a valid URL", ex);
334333
}
335-
if (StringUtils.hasText(issuerUri.getPath())) {
336-
throw new IllegalArgumentException("Path component for issuer ('" + issuerUri.getPath() + "') is currently not supported");
337-
}
338334
// rfc8414 https://datatracker.ietf.org/doc/html/rfc8414#section-2
339335
if (issuerUri.getQuery() != null || issuerUri.getFragment() != null) {
340336
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
@@ -161,13 +161,6 @@ public void loadContextWhenIssuerNotValidUriThenThrowException() {
161161
);
162162
}
163163

164-
@Test
165-
public void loadContextWhenIssuerWithPathThenThrowException() {
166-
assertThatThrownBy(
167-
() -> this.spring.register(AuthorizationServerConfigurationWithIssuerPath.class).autowire()
168-
);
169-
}
170-
171164
@Test
172165
public void loadContextWhenIssuerWithQueryThenThrowException() {
173166
assertThatThrownBy(
@@ -189,13 +182,6 @@ public void loadContextWhenIssuerWithQueryAndFragmentThenThrowException() {
189182
);
190183
}
191184

192-
@Test
193-
public void loadContextWhenIssuerWithEmptyPathThenThrowException() {
194-
assertThatThrownBy(
195-
() -> this.spring.register(AuthorizationServerConfigurationWithIssuerEmptyPath.class).autowire()
196-
);
197-
}
198-
199185
@Test
200186
public void loadContextWhenIssuerWithEmptyQueryThenThrowException() {
201187
assertThatThrownBy(
@@ -313,15 +299,6 @@ AuthorizationServerSettings authorizationServerSettings() {
313299
}
314300
}
315301

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

@@ -349,15 +326,6 @@ AuthorizationServerSettings authorizationServerSettings() {
349326
}
350327
}
351328

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

0 commit comments

Comments
 (0)