Closed
Description
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