Skip to content

Commit

Permalink
Sonar mentioned that there is an unused parameter
Browse files Browse the repository at this point in the history
removed
  • Loading branch information
strehle committed Apr 19, 2024
1 parent 481bddd commit 8ee6eb8
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,7 @@ public AuthorizationRequest createAuthorizationRequest(Map<String, String> autho
clientDetails.setResourceIds(resourceIds);
Map<String, String> actualParameters = new HashMap<>(authorizationParameters);
AuthorizationRequest request = new AuthorizationRequest(
actualParameters,
null,
clientId,
actualParameters, clientId,
scopes.isEmpty()?null:scopes,
null,
null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import org.cloudfoundry.identity.uaa.oauth.provider.ClientDetails;
import org.cloudfoundry.identity.uaa.oauth.provider.ClientDetailsService;

import java.util.Collections;
import java.util.LinkedHashSet;
import java.util.Map;
import java.util.Set;
Expand Down Expand Up @@ -63,7 +62,7 @@ public AuthorizationRequest createAuthorizationRequest(Map<String, String> autho

Set<String> scopes = extractScopes(authorizationParameters, clientId);

AuthorizationRequest request = new AuthorizationRequest(authorizationParameters, Collections.<String, String>emptyMap(), clientId, scopes, null,
AuthorizationRequest request = new AuthorizationRequest(authorizationParameters, clientId, scopes, null,
null, false, state, redirectUri, responseTypes);

ClientDetails clientDetails = clientDetailsService.loadClientByClientId(clientId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ public void testNullRefreshTokenString() {
public void testInvalidRefreshToken() {
Map<String, String> map = new HashMap<>();
map.put("grant_type", "refresh_token");
AuthorizationRequest authorizationRequest = new AuthorizationRequest(map, null, null, null, null, null, false, null, null, null);
AuthorizationRequest authorizationRequest = new AuthorizationRequest(map, null, null, null, null, false, null, null, null);
String refreshTokenValue = "dasdasdasdasdas";
try {
tokenServices.refreshAccessToken(refreshTokenValue, tokenSupport.requestFactory.createTokenRequest(authorizationRequest, "refresh_token"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -377,8 +377,7 @@ private AuthorizationRequest getAuthorizationRequest(String clientId, String red
if (responseTypes != null) {
parameters.put(OAuth2Utils.RESPONSE_TYPE, OAuth2Utils.formatParameterList(responseTypes));
}
return new AuthorizationRequest(parameters, Collections.emptyMap(),
parameters.get(OAuth2Utils.CLIENT_ID),
return new AuthorizationRequest(parameters, parameters.get(OAuth2Utils.CLIENT_ID),
OAuth2Utils.parseParameterList(parameters.get(OAuth2Utils.SCOPE)), null, null, false,
parameters.get(OAuth2Utils.STATE), parameters.get(OAuth2Utils.REDIRECT_URI),
OAuth2Utils.parseParameterList(parameters.get(OAuth2Utils.RESPONSE_TYPE)));
Expand Down

0 comments on commit 8ee6eb8

Please sign in to comment.