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

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

Introduction

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

Prototype

public String getClientId() 

Source Link

Usage

From source file:org.opentestsystem.shared.security.oauth.client.grant.samlbearer.SamlAssertionAccessTokenProvider.java

private MultiValueMap<String, String> getParametersForTokenRequest(
        final BaseOAuth2ProtectedResourceDetails resource, final String assertion) {
    final MultiValueMap<String, String> form = new LinkedMultiValueMap<String, String>();
    form.set("grant_type", SAML2_BEARER_GRANT_TYPE);
    form.set("assertion", assertion);
    form.set("client_id", resource.getClientId());
    LOGGER.info("YEAH... " + resource.getClientId());
    if (resource.isScoped()) {
        final String scopeString = resource.getScope() != null
                ? StringUtils.collectionToDelimitedString(resource.getScope(), " ")
                : "";
        form.set("scope", scopeString);
        LOGGER.info("YEAH... scope " + scopeString);
    }// ww w.jav a  2s.com

    return form;

}