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
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Key of the property that can be attached to theclient request
usingClientRequestContext.setProperty(String, Object)
and that definesaccess token
that should be used when generating OAuthAuthorization
http header.static final String
Key of the property that can be attached to theclient request
usingClientRequestContext.setProperty(String, Object)
and that definesconsumer credentials
that should be used when generating OAuthAuthorization
http header.static final String
Key of the property that can be attached to theclient request
usingClientRequestContext.setProperty(String, Object)
and that definesOAuth1Parameters
that should be used when generating OAuthAuthorization
http header.static final String
Key of the property that can be attached to theclient request
usingClientRequestContext.setProperty(String, Object)
and that definesOAuth1Secrets
that should be used when generating OAuthAuthorization
http header. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic OAuth1Builder
builder
(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 request
usingClientRequestContext.setProperty(String, Object)
and that definesconsumer credentials
that should be used when generating OAuthAuthorization
http header. The property will override the setting of the internalfilter
for the current request only.The value of the property must be
ConsumerCredentials
instance.- See Also:
-
OAUTH_PROPERTY_ACCESS_TOKEN
Key of the property that can be attached to theclient request
usingClientRequestContext.setProperty(String, Object)
and that definesaccess token
that should be used when generating OAuthAuthorization
http header. The property will override the setting of the internalfilter
for the current request only.The value of the property must be
AccessToken
instance.- See Also:
-
OAUTH_PROPERTY_OAUTH_PARAMETERS
Key of the property that can be attached to theclient request
usingClientRequestContext.setProperty(String, Object)
and that definesOAuth1Parameters
that should be used when generating OAuthAuthorization
http header. The property will override the setting of the internalfilter
for the current request only.The value of the property must be
OAuth1Parameters
instance.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 request
usingClientRequestContext.setProperty(String, Object)
and that definesOAuth1Secrets
that should be used when generating OAuthAuthorization
http header. The property will override the setting of the internalfilter
for the current request only.The value of the property must be
OAuth1Secrets
instance.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:
-
-
Constructor Details
-
OAuth1ClientSupport
private OAuth1ClientSupport()Prevent instantiation.
-
-
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.
-