Skip to content

Commit 86f3cd6

Browse files
committed
Polish gh-15940
Closes gh-15885
1 parent 4c6fef8 commit 86f3cd6

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

oauth2/oauth2-resource-server/src/main/java/org/springframework/security/oauth2/server/resource/web/DefaultBearerTokenResolver.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2023 the original author or authors.
2+
* Copyright 2002-2024 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.
@@ -57,15 +57,15 @@ public String resolve(final HttpServletRequest request) {
5757
? resolveFromRequestParameters(request) : null;
5858
if (authorizationHeaderToken != null) {
5959
if (parameterToken != null) {
60-
final BearerTokenError error = BearerTokenErrors
60+
BearerTokenError error = BearerTokenErrors
6161
.invalidRequest("Found multiple bearer tokens in the request");
6262
throw new OAuth2AuthenticationException(error);
6363
}
6464
return authorizationHeaderToken;
6565
}
6666
if (parameterToken != null && isParameterTokenEnabledForRequest(request)) {
6767
if (!StringUtils.hasText(parameterToken)) {
68-
final BearerTokenError error = BearerTokenErrors
68+
BearerTokenError error = BearerTokenErrors
6969
.invalidRequest("The requested token parameter is an empty string");
7070
throw new OAuth2AuthenticationException(error);
7171
}

oauth2/oauth2-resource-server/src/main/java/org/springframework/security/oauth2/server/resource/web/server/authentication/ServerBearerTokenAuthenticationConverter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2021 the original author or authors.
2+
* Copyright 2002-2024 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.
@@ -79,7 +79,7 @@ private String token(ServerHttpRequest request) {
7979
}
8080
if (parameterToken != null && isParameterTokenSupportedForRequest(request)) {
8181
if (!StringUtils.hasText(parameterToken)) {
82-
final BearerTokenError error = BearerTokenErrors
82+
BearerTokenError error = BearerTokenErrors
8383
.invalidRequest("The requested token parameter is an empty string");
8484
throw new OAuth2AuthenticationException(error);
8585
}

oauth2/oauth2-resource-server/src/test/java/org/springframework/security/oauth2/server/resource/web/DefaultBearerTokenResolverTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2021 the original author or authors.
2+
* Copyright 2002-2024 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.

oauth2/oauth2-resource-server/src/test/java/org/springframework/security/oauth2/server/resource/web/server/authentication/ServerBearerTokenAuthenticationConverterTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2021 the original author or authors.
2+
* Copyright 2002-2024 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.

0 commit comments

Comments
 (0)