Skip to content
This repository was archived by the owner on May 31, 2022. It is now read-only.
This repository was archived by the owner on May 31, 2022. It is now read-only.

ClientDetails clientDetails = clientDetailsService.loadClientByClientId(clientId); in wrong place #1966

@LazyMonkey1992

Description

@LazyMonkey1992

private Set extractScopes(Map<String, String> requestParameters, String clientId) {
Set scopes = OAuth2Utils.parseParameterList(requestParameters.get(OAuth2Utils.SCOPE));
ClientDetails clientDetails = clientDetailsService.loadClientByClientId(clientId);

	if ((scopes == null || scopes.isEmpty())) {
		// If no scopes are specified in the incoming data, use the default values registered with the client
		// (the spec allows us to choose between this option and rejecting the request completely, so we'll take the
		// least obnoxious choice as a default).
		scopes = clientDetails.getScope();
	}

	if (checkUserScopes) {
		scopes = checkUserScopes(scopes, clientDetails);
	}
	return scopes;
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions