Class OAuth1ClientSupport
The support for OAuth is divided into two parts:
This class contains static method that allows to build both OAuth1 features (authorization flow and client feature).
OAuth1AuthorizationFlow interface. The result of the process is
an AccessToken.client are
enhanced by an Authorization http header that contains OAuth1 authorization information
based on the AccessToken received from Authorization flow. This support is provided by
oauth 1 filter feature that is registered into client configuration.
- Since:
- 2.3
- Author:
- Miroslav Fuksa
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringKey of the property that can be attached to theclient requestusingClientRequestContext.setProperty(String, Object)and that definesaccess tokenthat should be used when generating OAuthAuthorizationhttp header.static final StringKey of the property that can be attached to theclient requestusingClientRequestContext.setProperty(String, Object)and that definesconsumer credentialsthat should be used when generating OAuthAuthorizationhttp header.static final StringKey of the property that can be attached to theclient requestusingClientRequestContext.setProperty(String, Object)and that definesOAuth1Parametersthat should be used when generating OAuthAuthorizationhttp header.static final StringKey of the property that can be attached to theclient requestusingClientRequestContext.setProperty(String, Object)and that definesOAuth1Secretsthat should be used when generating OAuthAuthorizationhttp header. -
Method Summary
Modifier and TypeMethodDescriptionstatic OAuth1Builderbuilder(ConsumerCredentials consumerCredentials) Get a new builder of OAuth1 client support.
-
Field Details
-
OAUTH_PROPERTY_CONSUMER_CREDENTIALS
Key of the property that can be attached to theclient requestusingClientRequestContext.setProperty(String, Object)and that definesconsumer credentialsthat should be used when generating OAuthAuthorizationhttp header. The property will override the setting of the internalfilterfor the current request only.The value of the property must be
ConsumerCredentialsinstance.- See Also:
-
OAUTH_PROPERTY_ACCESS_TOKEN
Key of the property that can be attached to theclient requestusingClientRequestContext.setProperty(String, Object)and that definesaccess tokenthat should be used when generating OAuthAuthorizationhttp header. The property will override the setting of the internalfilterfor the current request only.The value of the property must be
AccessTokeninstance.- See Also:
-
OAUTH_PROPERTY_OAUTH_PARAMETERS
Key of the property that can be attached to theclient requestusingClientRequestContext.setProperty(String, Object)and that definesOAuth1Parametersthat should be used when generating OAuthAuthorizationhttp header. The property will override the setting of the internalfilterfor the current request only.The value of the property must be
OAuth1Parametersinstance.This property is for advanced usage and should not be used if not needed as it can make the filter configuration inconsistent for the request and can produce unwanted results.
This property should be used only for configuring an instance of
OAuth feature, not theAuthorization flow.- See Also:
-
OAUTH_PROPERTY_OAUTH_SECRETS
Key of the property that can be attached to theclient requestusingClientRequestContext.setProperty(String, Object)and that definesOAuth1Secretsthat should be used when generating OAuthAuthorizationhttp header. The property will override the setting of the internalfilterfor the current request only.The value of the property must be
OAuth1Secretsinstance.This property is for advanced usage and should not be used if not needed as it can make the filter configuration inconsistent for the request and can produce unwanted results.
This property should be used only for configuring an instance of
OAuth feature, not theAuthorization flow.- See Also:
-
-
Method Details
-
builder
Get a new builder of OAuth1 client support.- Parameters:
consumerCredentials- Consumer credentials issued by the service provider for the application that wants to access data.- Returns:
- Builder instance.
-