Skip to content

Commit 2b3b5d2

Browse files
committed
Polish gh-1252
1 parent 890b1ef commit 2b3b5d2

15 files changed

+53
-54
lines changed

oauth2-authorization-server/src/main/java/org/springframework/security/oauth2/server/authorization/web/authentication/OAuth2AuthorizationCodeAuthenticationConverter.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2020-2021 the original author or authors.
2+
* Copyright 2020-2023 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.
@@ -84,7 +84,7 @@ public Authentication convert(HttpServletRequest request) {
8484
!key.equals(OAuth2ParameterNames.CLIENT_ID) &&
8585
!key.equals(OAuth2ParameterNames.CODE) &&
8686
!key.equals(OAuth2ParameterNames.REDIRECT_URI)) {
87-
additionalParameters.put(key, value.size() == 1 ? value.get(0) : value.toArray(new String[0]));
87+
additionalParameters.put(key, (value.size() == 1) ? value.get(0) : value.toArray(new String[0]));
8888
}
8989
});
9090

oauth2-authorization-server/src/main/java/org/springframework/security/oauth2/server/authorization/web/authentication/OAuth2AuthorizationCodeRequestAuthenticationConverter.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2020-2022 the original author or authors.
2+
* Copyright 2020-2023 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.
@@ -138,7 +138,7 @@ public Authentication convert(HttpServletRequest request) {
138138
!key.equals(OAuth2ParameterNames.REDIRECT_URI) &&
139139
!key.equals(OAuth2ParameterNames.SCOPE) &&
140140
!key.equals(OAuth2ParameterNames.STATE)) {
141-
additionalParameters.put(key, value.size() == 1 ? value.get(0) : value.toArray(new String[0]));
141+
additionalParameters.put(key, (value.size() == 1) ? value.get(0) : value.toArray(new String[0]));
142142
}
143143
});
144144

oauth2-authorization-server/src/main/java/org/springframework/security/oauth2/server/authorization/web/authentication/OAuth2AuthorizationConsentAuthenticationConverter.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2020-2022 the original author or authors.
2+
* Copyright 2020-2023 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.
@@ -93,7 +93,7 @@ public Authentication convert(HttpServletRequest request) {
9393
if (!key.equals(OAuth2ParameterNames.CLIENT_ID) &&
9494
!key.equals(OAuth2ParameterNames.STATE) &&
9595
!key.equals(OAuth2ParameterNames.SCOPE)) {
96-
additionalParameters.put(key, value.size() == 1 ? value.get(0) : value.toArray(new String[0]));
96+
additionalParameters.put(key, (value.size() == 1) ? value.get(0) : value.toArray(new String[0]));
9797
}
9898
});
9999

oauth2-authorization-server/src/main/java/org/springframework/security/oauth2/server/authorization/web/authentication/OAuth2ClientCredentialsAuthenticationConverter.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2020-2021 the original author or authors.
2+
* Copyright 2020-2023 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 @@ public Authentication convert(HttpServletRequest request) {
7979
parameters.forEach((key, value) -> {
8080
if (!key.equals(OAuth2ParameterNames.GRANT_TYPE) &&
8181
!key.equals(OAuth2ParameterNames.SCOPE)) {
82-
additionalParameters.put(key, value.size() == 1 ? value.get(0) : value.toArray(new String[0]));
82+
additionalParameters.put(key, (value.size() == 1) ? value.get(0) : value.toArray(new String[0]));
8383
}
8484
});
8585

oauth2-authorization-server/src/main/java/org/springframework/security/oauth2/server/authorization/web/authentication/OAuth2EndpointUtils.java

+10-7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2020-2021 the original author or authors.
2+
* Copyright 2020-2023 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.
@@ -16,8 +16,8 @@
1616
package org.springframework.security.oauth2.server.authorization.web.authentication;
1717

1818
import java.util.Collections;
19+
import java.util.HashMap;
1920
import java.util.Map;
20-
import java.util.stream.Collectors;
2121

2222
import javax.servlet.http.HttpServletRequest;
2323

@@ -58,13 +58,16 @@ static Map<String, Object> getParametersIfMatchesAuthorizationCodeGrantRequest(H
5858
if (!matchesAuthorizationCodeGrantRequest(request)) {
5959
return Collections.emptyMap();
6060
}
61-
MultiValueMap<String, String> parameters = getParameters(request);
61+
MultiValueMap<String, String> multiValueParameters = getParameters(request);
6262
for (String exclusion : exclusions) {
63-
parameters.remove(exclusion);
63+
multiValueParameters.remove(exclusion);
6464
}
65-
return parameters.entrySet().stream()
66-
.collect(Collectors.toMap(Map.Entry::getKey,
67-
e -> e.getValue().size() == 1 ? e.getValue().get(0) : e.getValue().toArray(new String[0])));
65+
66+
Map<String, Object> parameters = new HashMap<>();
67+
multiValueParameters.forEach((key, value) ->
68+
parameters.put(key, (value.size() == 1) ? value.get(0) : value.toArray(new String[0])));
69+
70+
return parameters;
6871
}
6972

7073
static boolean matchesAuthorizationCodeGrantRequest(HttpServletRequest request) {

oauth2-authorization-server/src/main/java/org/springframework/security/oauth2/server/authorization/web/authentication/OAuth2RefreshTokenAuthenticationConverter.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2020-2021 the original author or authors.
2+
* Copyright 2020-2023 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.
@@ -90,7 +90,7 @@ public Authentication convert(HttpServletRequest request) {
9090
if (!key.equals(OAuth2ParameterNames.GRANT_TYPE) &&
9191
!key.equals(OAuth2ParameterNames.REFRESH_TOKEN) &&
9292
!key.equals(OAuth2ParameterNames.SCOPE)) {
93-
additionalParameters.put(key, value.size() == 1 ? value.get(0) : value.toArray(new String[0]));
93+
additionalParameters.put(key, (value.size() == 1) ? value.get(0) : value.toArray(new String[0]));
9494
}
9595
});
9696

oauth2-authorization-server/src/main/java/org/springframework/security/oauth2/server/authorization/web/authentication/OAuth2TokenIntrospectionAuthenticationConverter.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2020-2022 the original author or authors.
2+
* Copyright 2020-2023 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.
@@ -69,7 +69,7 @@ public Authentication convert(HttpServletRequest request) {
6969
parameters.forEach((key, value) -> {
7070
if (!key.equals(OAuth2ParameterNames.TOKEN) &&
7171
!key.equals(OAuth2ParameterNames.TOKEN_TYPE_HINT)) {
72-
additionalParameters.put(key, value.size() == 1 ? value.get(0) : value.toArray(new String[0]));
72+
additionalParameters.put(key, (value.size() == 1) ? value.get(0) : value.toArray(new String[0]));
7373
}
7474
});
7575

oauth2-authorization-server/src/main/java/org/springframework/security/oauth2/server/authorization/web/authentication/PublicClientAuthenticationConverter.java

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2020-2021 the original author or authors.
2+
* Copyright 2020-2023 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.
@@ -70,9 +70,8 @@ public Authentication convert(HttpServletRequest request) {
7070
parameters.remove(OAuth2ParameterNames.CLIENT_ID);
7171

7272
Map<String, Object> additionalParameters = new HashMap<>();
73-
parameters.forEach((key, value) -> {
74-
additionalParameters.put(key, value.size() == 1 ? value.get(0) : value.toArray(new String[0]));
75-
});
73+
parameters.forEach((key, value) ->
74+
additionalParameters.put(key, (value.size() == 1) ? value.get(0) : value.toArray(new String[0])));
7675

7776
return new OAuth2ClientAuthenticationToken(clientId, ClientAuthenticationMethod.NONE, null,
7877
additionalParameters);

oauth2-authorization-server/src/test/java/org/springframework/security/oauth2/server/authorization/web/OAuth2AuthorizationEndpointFilterTests.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,7 @@ public void doFilterWhenAuthorizationRequestAuthenticatedThenAuthorizationRespon
556556
.thenReturn(authorizationCodeRequestAuthenticationResult);
557557

558558
MockHttpServletRequest request = createAuthorizationRequest(registeredClient);
559-
request.addParameter("foo", "value1", "value2");
559+
request.addParameter("custom-param", "custom-value-1", "custom-value-2");
560560

561561
MockHttpServletResponse response = new MockHttpServletResponse();
562562
FilterChain filterChain = mock(FilterChain.class);
@@ -575,9 +575,9 @@ public void doFilterWhenAuthorizationRequestAuthenticatedThenAuthorizationRespon
575575

576576
// Assert that multi-valued request parameters are preserved
577577
assertThat(authorizationCodeRequestAuthenticationCaptor.getValue().getAdditionalParameters())
578-
.extracting(ap -> ap.get("foo"))
578+
.extracting(params -> params.get("custom-param"))
579579
.asInstanceOf(type(String[].class))
580-
.isEqualTo(new String[] { "value1", "value2" });
580+
.isEqualTo(new String[] { "custom-value-1", "custom-value-2" });
581581
assertThat(response.getStatus()).isEqualTo(HttpStatus.FOUND.value());
582582
assertThat(response.getRedirectedUrl()).isEqualTo(
583583
"https://example.com?param=encoded%20parameter%20value&code=code&state=client%20state");

oauth2-authorization-server/src/test/java/org/springframework/security/oauth2/server/authorization/web/OAuth2TokenEndpointFilterTests.java

+8-11
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2020-2022 the original author or authors.
2+
* Copyright 2020-2023 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.
@@ -18,7 +18,6 @@
1818
import java.time.Duration;
1919
import java.time.Instant;
2020
import java.util.Arrays;
21-
import java.util.Collections;
2221
import java.util.HashSet;
2322
import java.util.Map;
2423

@@ -242,10 +241,9 @@ public void doFilterWhenAuthorizationCodeTokenRequestThenAccessTokenResponse() t
242241
new HashSet<>(Arrays.asList("scope1", "scope2")));
243242
OAuth2RefreshToken refreshToken = new OAuth2RefreshToken(
244243
"refresh-token", Instant.now(), Instant.now().plus(Duration.ofDays(1)));
245-
Map<String, Object> additionalParameters = Collections.singletonMap("custom-param", "custom-value");
246244
OAuth2AccessTokenAuthenticationToken accessTokenAuthentication =
247245
new OAuth2AccessTokenAuthenticationToken(
248-
registeredClient, clientPrincipal, accessToken, refreshToken, additionalParameters);
246+
registeredClient, clientPrincipal, accessToken, refreshToken);
249247

250248
when(this.authenticationManager.authenticate(any())).thenReturn(accessTokenAuthentication);
251249

@@ -274,7 +272,7 @@ public void doFilterWhenAuthorizationCodeTokenRequestThenAccessTokenResponse() t
274272
request.getParameter(OAuth2ParameterNames.REDIRECT_URI));
275273
assertThat(authorizationCodeAuthentication.getAdditionalParameters())
276274
.containsExactly(entry("custom-param-1", "custom-value-1"),
277-
entry("custom-param-2", new String[]{ "custom-value-2a", "custom-value-2b" }));
275+
entry("custom-param-2", new String[] { "custom-value-1", "custom-value-2" }));
278276
assertThat(authorizationCodeAuthentication.getDetails())
279277
.asInstanceOf(type(WebAuthenticationDetails.class))
280278
.extracting(WebAuthenticationDetails::getRemoteAddress)
@@ -292,7 +290,6 @@ public void doFilterWhenAuthorizationCodeTokenRequestThenAccessTokenResponse() t
292290
accessToken.getExpiresAt().minusSeconds(1), accessToken.getExpiresAt().plusSeconds(1));
293291
assertThat(accessTokenResult.getScopes()).isEqualTo(accessToken.getScopes());
294292
assertThat(accessTokenResponse.getRefreshToken().getTokenValue()).isEqualTo(refreshToken.getTokenValue());
295-
assertThat(accessTokenResponse.getAdditionalParameters()).containsExactly(entry("custom-param", "custom-value"));
296293
}
297294

298295
@Test
@@ -342,7 +339,7 @@ public void doFilterWhenClientCredentialsTokenRequestThenAccessTokenResponse() t
342339
assertThat(clientCredentialsAuthentication.getScopes()).isEqualTo(registeredClient.getScopes());
343340
assertThat(clientCredentialsAuthentication.getAdditionalParameters())
344341
.containsExactly(entry("custom-param-1", "custom-value-1"),
345-
entry("custom-param-2", new String[]{ "custom-value-2a", "custom-value-2b" }));
342+
entry("custom-param-2", new String[] { "custom-value-1", "custom-value-2" }));
346343
assertThat(clientCredentialsAuthentication.getDetails())
347344
.asInstanceOf(type(WebAuthenticationDetails.class))
348345
.extracting(WebAuthenticationDetails::getRemoteAddress)
@@ -433,7 +430,7 @@ public void doFilterWhenRefreshTokenRequestThenAccessTokenResponse() throws Exce
433430
assertThat(refreshTokenAuthenticationToken.getScopes()).isEqualTo(registeredClient.getScopes());
434431
assertThat(refreshTokenAuthenticationToken.getAdditionalParameters())
435432
.containsExactly(entry("custom-param-1", "custom-value-1"),
436-
entry("custom-param-2", new String[]{ "custom-value-2a", "custom-value-2b" }));
433+
entry("custom-param-2", new String[] { "custom-value-1", "custom-value-2" }));
437434
assertThat(refreshTokenAuthenticationToken.getDetails())
438435
.asInstanceOf(type(WebAuthenticationDetails.class))
439436
.extracting(WebAuthenticationDetails::getRemoteAddress)
@@ -616,7 +613,7 @@ private static MockHttpServletRequest createAuthorizationCodeTokenRequest(Regist
616613
// The client does not need to send the client ID param, but we are resilient in case they do
617614
request.addParameter(OAuth2ParameterNames.CLIENT_ID, registeredClient.getClientId());
618615
request.addParameter("custom-param-1", "custom-value-1");
619-
request.addParameter("custom-param-2", "custom-value-2a", "custom-value-2b");
616+
request.addParameter("custom-param-2", "custom-value-1", "custom-value-2");
620617

621618
return request;
622619
}
@@ -631,7 +628,7 @@ private static MockHttpServletRequest createClientCredentialsTokenRequest(Regist
631628
request.addParameter(OAuth2ParameterNames.SCOPE,
632629
StringUtils.collectionToDelimitedString(registeredClient.getScopes(), " "));
633630
request.addParameter("custom-param-1", "custom-value-1");
634-
request.addParameter("custom-param-2", "custom-value-2a", "custom-value-2b");
631+
request.addParameter("custom-param-2", "custom-value-1", "custom-value-2");
635632

636633
return request;
637634
}
@@ -647,7 +644,7 @@ private static MockHttpServletRequest createRefreshTokenTokenRequest(RegisteredC
647644
request.addParameter(OAuth2ParameterNames.SCOPE,
648645
StringUtils.collectionToDelimitedString(registeredClient.getScopes(), " "));
649646
request.addParameter("custom-param-1", "custom-value-1");
650-
request.addParameter("custom-param-2", "custom-value-2a", "custom-value-2b");
647+
request.addParameter("custom-param-2", "custom-value-1", "custom-value-2");
651648

652649
return request;
653650
}

oauth2-authorization-server/src/test/java/org/springframework/security/oauth2/server/authorization/web/OAuth2TokenIntrospectionEndpointFilterTests.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2020-2022 the original author or authors.
2+
* Copyright 2020-2023 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.
@@ -219,7 +219,7 @@ public void doFilterWhenTokenIntrospectionRequestValidThenSuccessResponse() thro
219219
MockHttpServletRequest request = createTokenIntrospectionRequest(
220220
accessToken.getTokenValue(), OAuth2TokenType.ACCESS_TOKEN.getValue());
221221
request.addParameter("custom-param-1", "custom-value-1");
222-
request.addParameter("custom-param-2", "custom-value-2a", "custom-value-2b");
222+
request.addParameter("custom-param-2", "custom-value-1", "custom-value-2");
223223

224224
MockHttpServletResponse response = new MockHttpServletResponse();
225225
FilterChain filterChain = mock(FilterChain.class);
@@ -236,7 +236,7 @@ public void doFilterWhenTokenIntrospectionRequestValidThenSuccessResponse() thro
236236
assertThat(tokenIntrospectionAuthentication.getValue().getAdditionalParameters())
237237
.contains(
238238
entry("custom-param-1", "custom-value-1"),
239-
entry("custom-param-2", new String[]{"custom-value-2a", "custom-value-2b"}));
239+
entry("custom-param-2", new String[] {"custom-value-1", "custom-value-2"}));
240240

241241
OAuth2TokenIntrospection tokenIntrospectionResponse = readTokenIntrospectionResponse(response);
242242
assertThat(tokenIntrospectionResponse.isActive()).isEqualTo(tokenClaims.isActive());

oauth2-authorization-server/src/test/java/org/springframework/security/oauth2/server/authorization/web/authentication/ClientSecretBasicAuthenticationConverterTests.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2020-2022 the original author or authors.
2+
* Copyright 2020-2023 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.
@@ -106,7 +106,7 @@ public void convertWhenAuthorizationHeaderBasicWithValidCredentialsThenReturnCli
106106
@Test
107107
public void convertWhenConfidentialClientWithPkceParametersThenAdditionalParametersIncluded() throws Exception {
108108
MockHttpServletRequest request = createPkceTokenRequest();
109-
request.addParameter("custom-param-1", "custom-value-1a", "custom-value-1b");
109+
request.addParameter("custom-param", "custom-value-1", "custom-value-2");
110110
request.addHeader(HttpHeaders.AUTHORIZATION, "Basic " + encodeBasicAuth("clientId", "secret"));
111111
OAuth2ClientAuthenticationToken authentication = (OAuth2ClientAuthenticationToken) this.converter.convert(request);
112112
assertThat(authentication.getPrincipal()).isEqualTo("clientId");
@@ -117,7 +117,7 @@ public void convertWhenConfidentialClientWithPkceParametersThenAdditionalParamet
117117
entry(OAuth2ParameterNames.GRANT_TYPE, AuthorizationGrantType.AUTHORIZATION_CODE.getValue()),
118118
entry(OAuth2ParameterNames.CODE, "code"),
119119
entry(PkceParameterNames.CODE_VERIFIER, "code-verifier-1"),
120-
entry("custom-param-1", new String[] { "custom-value-1a", "custom-value-1b" }));
120+
entry("custom-param", new String[] { "custom-value-1", "custom-value-2" }));
121121
}
122122

123123
private static String encodeBasicAuth(String clientId, String secret) throws Exception {

oauth2-authorization-server/src/test/java/org/springframework/security/oauth2/server/authorization/web/authentication/ClientSecretPostAuthenticationConverterTests.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2020-2022 the original author or authors.
2+
* Copyright 2020-2023 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.
@@ -95,7 +95,7 @@ public void convertWhenConfidentialClientWithPkceParametersThenAdditionalParamet
9595
MockHttpServletRequest request = createPkceTokenRequest();
9696
request.addParameter(OAuth2ParameterNames.CLIENT_ID, "client-1");
9797
request.addParameter(OAuth2ParameterNames.CLIENT_SECRET, "client-secret");
98-
request.addParameter("custom-param-1", "custom-value-1a", "custom-value-1b");
98+
request.addParameter("custom-param", "custom-value-1", "custom-value-2");
9999
OAuth2ClientAuthenticationToken authentication = (OAuth2ClientAuthenticationToken) this.converter.convert(request);
100100
assertThat(authentication.getPrincipal()).isEqualTo("client-1");
101101
assertThat(authentication.getCredentials()).isEqualTo("client-secret");
@@ -105,7 +105,7 @@ public void convertWhenConfidentialClientWithPkceParametersThenAdditionalParamet
105105
entry(OAuth2ParameterNames.GRANT_TYPE, AuthorizationGrantType.AUTHORIZATION_CODE.getValue()),
106106
entry(OAuth2ParameterNames.CODE, "code"),
107107
entry(PkceParameterNames.CODE_VERIFIER, "code-verifier-1"),
108-
entry("custom-param-1", new String[] { "custom-value-1a", "custom-value-1b" }));
108+
entry("custom-param", new String[] { "custom-value-1", "custom-value-2" }));
109109
}
110110

111111
private static MockHttpServletRequest createPkceTokenRequest() {

oauth2-authorization-server/src/test/java/org/springframework/security/oauth2/server/authorization/web/authentication/JwtClientAssertionAuthenticationConverterTests.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2020-2022 the original author or authors.
2+
* Copyright 2020-2023 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.
@@ -108,7 +108,7 @@ public void convertWhenJwtAssertionThenReturnClientAuthenticationToken() {
108108
request.addParameter(OAuth2ParameterNames.GRANT_TYPE, AuthorizationGrantType.AUTHORIZATION_CODE.getValue());
109109
request.addParameter(OAuth2ParameterNames.CODE, "code");
110110
request.addParameter("custom-param-1", "custom-value-1");
111-
request.addParameter("custom-param-2", "custom-value-2a", "custom-value-2b");
111+
request.addParameter("custom-param-2", "custom-value-1", "custom-value-2");
112112
OAuth2ClientAuthenticationToken authentication = (OAuth2ClientAuthenticationToken) this.converter.convert(request);
113113
assertThat(authentication.getPrincipal()).isEqualTo("client-1");
114114
assertThat(authentication.getCredentials()).isEqualTo("jwt-assertion");
@@ -118,7 +118,7 @@ public void convertWhenJwtAssertionThenReturnClientAuthenticationToken() {
118118
entry(OAuth2ParameterNames.GRANT_TYPE, AuthorizationGrantType.AUTHORIZATION_CODE.getValue()),
119119
entry(OAuth2ParameterNames.CODE, "code"),
120120
entry("custom-param-1", "custom-value-1"),
121-
entry("custom-param-2", new String[] {"custom-value-2a", "custom-value-2b"}));
121+
entry("custom-param-2", new String[] {"custom-value-1", "custom-value-2"}));
122122
}
123123

124124
private void assertThrown(MockHttpServletRequest request, String errorCode) {

0 commit comments

Comments
 (0)