public class OAuth1ClientCredentialsProvider extends Object implements ClientCredentialsProvider
ClientCredentialsProvider that injects client credentials by signing
token requests with an OAuth1 signature.| Modifier and Type | Class and Description |
|---|---|
static class |
OAuth1ClientCredentialsProvider.FromFile
An
OAuth1ClientCredentialsProvider.FromProperties that pulls credential values from the specified File. |
static class |
OAuth1ClientCredentialsProvider.FromProperties
An
OAuth1ClientCredentialsProvider that pulls credentials values
from the given properties. |
| Constructor and Description |
|---|
OAuth1ClientCredentialsProvider(Clock clock,
String tokenEndpointUrl,
String accessKeyId,
String accessKeySecret) |
OAuth1ClientCredentialsProvider(Clock clock,
String tokenEndpointUrl,
String accessKeyId,
String accessKeySecret,
String scope) |
OAuth1ClientCredentialsProvider(String tokenEndpointUrl,
String accessKeyId,
String accessKeySecret)
Construct a new
OAuth1ClientCredentialsProvider that points to
the given token endpoint and uses the given client credentials to sign
requests using OAuth1 signatures. |
OAuth1ClientCredentialsProvider(String tokenEndpointUrl,
String accessKeyId,
String accessKeySecret,
String scope) |
| Modifier and Type | Method and Description |
|---|---|
HttpProvider.HttpRequestAuthorizer |
getClientAuthorizer()
Gets the
HttpRequestAuthorizer that the client will use
to authorize access token requests. |
Clock |
getClock()
Get the Clock implementation in use.
|
HttpConstants.HttpMethods |
getHttpMethod()
Get the HTTP Method used to obtain authorization.
|
AccessTokenRequest |
getNewAccessTokenRequest()
Gets a new AccessTokenRequest to authorize this client to obtain
an Access Token.
|
static Properties |
getPropertiesFromFile(File file)
Loads the File as an InputStream into a new Properties object,
and returns it.
|
String |
getScope()
Get the token scope.
|
String |
getTokenEndpointUrl()
Gets the url of the token endpoint for this OAuth 2.0 Provider.
|
public OAuth1ClientCredentialsProvider(String tokenEndpointUrl, String accessKeyId, String accessKeySecret)
OAuth1ClientCredentialsProvider that points to
the given token endpoint and uses the given client credentials to sign
requests using OAuth1 signatures.tokenEndpointUrl - the full URL of the OAuth2.0 token endpointaccessKeyId - the access key id to be used as a client credentialaccessKeySecret - the access key secret to be used as a client credentialpublic OAuth1ClientCredentialsProvider(String tokenEndpointUrl, String accessKeyId, String accessKeySecret, String scope)
public OAuth1ClientCredentialsProvider(Clock clock, String tokenEndpointUrl, String accessKeyId, String accessKeySecret)
public Clock getClock()
getClock in interface ClientAuthorizationRequestProviderpublic String getTokenEndpointUrl()
getTokenEndpointUrl in interface ClientAuthorizationRequestProviderpublic HttpProvider.HttpRequestAuthorizer getClientAuthorizer()
HttpRequestAuthorizer that the client will use
to authorize access token requests.getClientAuthorizer in interface ClientAuthorizationRequestProviderpublic static Properties getPropertiesFromFile(File file) throws IOException
file - the File to use as inputIOException - if there is trouble reading the properties from the filepublic AccessTokenRequest getNewAccessTokenRequest()
getNewAccessTokenRequest in interface ClientAuthorizationRequestProviderpublic HttpConstants.HttpMethods getHttpMethod()
getHttpMethod in interface ClientAuthorizationRequestProviderpublic String getScope()
getScope in interface ClientAuthorizationRequestProviderCopyright © 2020 HERE Europe B.V. All Rights Reserved.