Example usage for org.springframework.security.oauth2.common AuthenticationScheme header

List of usage examples for org.springframework.security.oauth2.common AuthenticationScheme header

Introduction

In this page you can find the example usage for org.springframework.security.oauth2.common AuthenticationScheme header.

Prototype

AuthenticationScheme header

To view the source code for org.springframework.security.oauth2.common AuthenticationScheme header.

Click Source Link

Document

Send an Authorization header.

Usage

From source file:org.cloudfoundry.identity.uaa.test.UaaTestAccounts.java

public ClientCredentialsResourceDetails getClientCredentialsResource(String[] scope, String clientId,
        String clientSecret) {//from   w w w.ja  v  a2  s  .c  om
    ClientCredentialsResourceDetails resource = new ClientCredentialsResourceDetails();
    resource.setClientId(clientId);
    resource.setClientSecret(clientSecret);
    resource.setId(clientId);
    if (scope != null) {
        resource.setScope(Arrays.asList(scope));
    }
    resource.setClientAuthenticationScheme(AuthenticationScheme.header);
    resource.setAccessTokenUri(server.getAccessTokenUri());
    return resource;
}

From source file:org.cloudfoundry.identity.uaa.test.UaaTestAccounts.java

public ImplicitResourceDetails getImplicitResource(String clientPrefix, String defaultClientId,
        String defaultRedirectUri) {
    ImplicitResourceDetails resource = new ImplicitResourceDetails();
    String clientId = environment.getProperty(clientPrefix + ".id", defaultClientId);
    resource.setClientId(clientId);//from  w  ww .  j  a va 2  s  . co  m
    resource.setId(clientId);
    resource.setClientAuthenticationScheme(AuthenticationScheme.header);
    resource.setAccessTokenUri(server.getAuthorizationUri());
    String redirectUri = environment.getProperty(clientPrefix + ".redirect-uri", defaultRedirectUri);
    resource.setPreEstablishedRedirectUri(redirectUri);
    return resource;
}

From source file:org.cloudfoundry.identity.uaa.test.UaaTestAccounts.java

@Override
public ResourceOwnerPasswordResourceDetails getResourceOwnerPasswordResource(String[] scope, String clientId,
        String clientSecret, String username, String password) {

    ResourceOwnerPasswordResourceDetails resource = new ResourceOwnerPasswordResourceDetails();
    resource.setClientId(clientId);/*from   w  w  w.  j a v  a  2 s .c  o  m*/
    resource.setClientSecret(clientSecret);
    resource.setId(clientId);
    resource.setScope(Arrays.asList(scope));
    resource.setUsername(username);
    resource.setPassword(password);
    resource.setClientAuthenticationScheme(AuthenticationScheme.header);
    resource.setAccessTokenUri(server.getAccessTokenUri());
    return resource;
}