Describe the bug
The additionalParameters array parameter of OAuth2AuthorizationRequest causes the authorizationRequestUri to be incorrect
To Reproduce
Access the spring authorization server http://127.0.0.1:3000/oauth2/authorize?scope=openid%20profile&client_id=xx&response_type=code&state=12345&test=1&test=2
java code:
OAuth2AuthorizationRequest authorizationRequest = OAuth2AuthorizationRequest.authorizationCode()
.authorizationUri(authorizationCodeRequestAuthentication.getAuthorizationUri()) // http://127.0.0.1:3000/oauth2/authorize
.clientId(registeredClient.getClientId()) //xxx
.redirectUri(authorizationCodeRequestAuthentication.getRedirectUri())
.scopes(authorizationCodeRequestAuthentication.getScopes())
.state(state)
.additionalParameters(authorizationCodeRequestAuthentication.getAdditionalParameters()) // map: {"test":["1","2"]}
.build();
authorizationRequest.getAuthorizationRequestUri() // http://127.0.0.1:3000/oauth2/authorize?response_type=code&client_id=xx&scope=openid%20profile&state=12345&test=%5BLjava.lang.String;@14ec7490
http://127.0.0.1:3000/oauth2/authorize?response_type=code&client_id=xx&scope=openid%20profile&state=12345&test=%5BLjava.lang.String;@14ec7490
The parameter test is wrong
Expected behavior
http://127.0.0.1:3000/oauth2/authorize?response_type=code&client_id=xx&scope=openid%20profile&state=12345&test=1&test=2
Describe the bug
The additionalParameters array parameter of OAuth2AuthorizationRequest causes the authorizationRequestUri to be incorrect
To Reproduce
Access the spring authorization server
http://127.0.0.1:3000/oauth2/authorize?scope=openid%20profile&client_id=xx&response_type=code&state=12345&test=1&test=2java code:
http://127.0.0.1:3000/oauth2/authorize?response_type=code&client_id=xx&scope=openid%20profile&state=12345&test=%5BLjava.lang.String;@14ec7490The parameter
testis wrongExpected behavior
http://127.0.0.1:3000/oauth2/authorize?response_type=code&client_id=xx&scope=openid%20profile&state=12345&test=1&test=2