public class ClientCredentialsGrantTokenClient extends CustomGrantTokenClient
| Constructor and Description |
|---|
ClientCredentialsGrantTokenClient(String tokenEndpointUri,
ClientCredentials clientCredentials)
OAuth2 Creates new token client
|
ClientCredentialsGrantTokenClient(String tokenEndpointUri,
ClientCredentials clientCredentials,
TokenCache cache)
OAuth2 Creates new token client
|
| Modifier and Type | Method and Description |
|---|---|
protected String |
getGrantType() |
String |
getToken(String... scopes)
Retrieve access token for the configured "client_id" and specified scopes.
|
getTokenInternalpublic ClientCredentialsGrantTokenClient(String tokenEndpointUri, ClientCredentials clientCredentials)
tokenEndpointUri - OAuth2 Token endpoint URIclientCredentials - OAuth2 client credentialspublic ClientCredentialsGrantTokenClient(String tokenEndpointUri, ClientCredentials clientCredentials, TokenCache cache)
tokenEndpointUri - OAuth2 Token endpoint URIclientCredentials - OAuth2 client credentialscache - Token cachepublic String getToken(String... scopes) throws IOException
scopes - OAuth2 scopes to requestIOException - Exception during token endpoint communicationprotected String getGrantType()
getGrantType in class CustomGrantTokenClientCopyright © 2016 Scalepoint Technologies Ltd.. All rights reserved.