Example usage for org.springframework.security.oauth2.client.resource BaseOAuth2ProtectedResourceDetails setScope

List of usage examples for org.springframework.security.oauth2.client.resource BaseOAuth2ProtectedResourceDetails setScope

Introduction

In this page you can find the example usage for org.springframework.security.oauth2.client.resource BaseOAuth2ProtectedResourceDetails setScope.

Prototype

public void setScope(List<String> scope) 

Source Link

Usage

From source file:org.cloudfoundry.identity.client.UaaContextFactory.java

/**
 * Sets the requested scopes on the resource details, if and only if the requested scopes are not null
 * @param tokenRequest the token request containing the requested scopes, if any
 * @param details the details object that will be configured
 *//* w  w  w.ja  v a  2  s  .c om*/
protected void setRequestScopes(TokenRequest tokenRequest, BaseOAuth2ProtectedResourceDetails details) {
    if (!Objects.isNull(tokenRequest.getScopes())) {
        details.setScope(new LinkedList(tokenRequest.getScopes()));
    }
}