| java.lang.Object | |
| ↳ | com.google.gdata.client.authn.oauth.OAuthParameters |
Known Direct Subclasses
|
Container for OAuth-related parameters. The parameters are divided into two categories: those used to generate the signature base string, and other parameters. For each parameter, there are 4 different types of methods: a getter, a setter, a check if the parameter exists (that returns a boolean) and a check if the parameter exists (that throws an exception). Refer to the getters/setters for each parameter below to learn more about the parameter.
| Nested Classes | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| OAuthParameters.OAuthType | Type of OAuth for this parameter set (i.e., two-legged or three-legged OAuth (see https://sites.google.com/a/google.com/oauth/). | ||||||||||
| Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| String | OAUTH_CALLBACK_KEY | ||||||||||
| String | OAUTH_CONSUMER_KEY | ||||||||||
| String | OAUTH_CONSUMER_SECRET | ||||||||||
| String | OAUTH_KEY | ||||||||||
| String | OAUTH_NONCE_KEY | ||||||||||
| String | OAUTH_SIGNATURE_KEY | ||||||||||
| String | OAUTH_SIGNATURE_METHOD_KEY | ||||||||||
| String | OAUTH_TIMESTAMP_KEY | ||||||||||
| String | OAUTH_TOKEN_KEY | ||||||||||
| String | OAUTH_TOKEN_SECRET_KEY | ||||||||||
| String | OAUTH_VERIFIER_KEY | ||||||||||
| String | REALM_KEY | ||||||||||
| String | XOAUTH_REQUESTOR_ID_KEY | ||||||||||
| Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| baseParameters | |||||||||||
| extraParameters | |||||||||||
| oauthType | |||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Creates a new
OAuthParameters object. | |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Adds a parameter to be used when generating the OAuth signature.
| |||||||||||
Sets a parameter related to OAuth (but not used when generating the
signature).
| |||||||||||
Checks to see if the OAuth callback exists.
| |||||||||||
Checks to see if the OAuth Consumer Key exists.
| |||||||||||
Checks to see if the OAuth nonce exists.
| |||||||||||
Checks to see if the OAuth signature exists.
| |||||||||||
Checks to see if the OAuth signature method exists.
| |||||||||||
Checks to see if the OAuth timestamp exists.
| |||||||||||
Checks to see if the OAuth token exists.
| |||||||||||
Checks to see if the OAuth token secret exists.
| |||||||||||
Checks to see if the OAuth Verifier exists.
| |||||||||||
Checks to see if the realm exists.
| |||||||||||
Checks to see if the OAuth callback exists.
| |||||||||||
Checks to see if the OAuth Consumer Key exists.
| |||||||||||
Checks to see if the OAuth nonce exists.
| |||||||||||
Checks to see if the OAuth signature exists.
| |||||||||||
Checks to see if the OAuth signature method exists.
| |||||||||||
Checks to see if the OAuth timestamp exists.
| |||||||||||
Checks to see if the OAuth token exists.
| |||||||||||
Checks to see if the OAuth token secret exists.
| |||||||||||
Checks to see if the OAuth Verifier exists.
| |||||||||||
Checks to see if the realm exists.
| |||||||||||
Return the parameters used to calculate the OAuth signature.
| |||||||||||
Returns any other parameters used in the OAuth process, such as the
OAuth callback url.
| |||||||||||
Returns the OAuth callback url.
| |||||||||||
Returns the OAuth Consumer Key.
| |||||||||||
Returns the OAuth nonce.
| |||||||||||
Returns the OAuth signature used to sign the current request.
| |||||||||||
Returns the OAuth Signature Method.
| |||||||||||
Returns the OAuth timestamp.
| |||||||||||
Returns the OAuth token.
| |||||||||||
Returns the OAuth Token Secret.
| |||||||||||
Retrieves the OAuth type requested.
| |||||||||||
Returns the OAuth Verifier.
| |||||||||||
Returns the Realm parameter to be used in the authorization header, as
defined by
Removes a parameter from the OAuth signature.
| |||||||||||
Resets all transient parameters related to a single request, so that these
parameters do not interfere with multiple requests.
| |||||||||||
Sets the OAuth callback url.
| |||||||||||
Sets the OAuth Consumer Key.
| |||||||||||
Sets the OAuth nonce.
| |||||||||||
Sets the OAuth signature used to sign the current request.
| |||||||||||
Sets the OAuth Signature Method.
| |||||||||||
Sets the OAuth timestamp.
| |||||||||||
Sets the OAuth token.
| |||||||||||
Returns the OAuth Token Secret.
| |||||||||||
Sets the value of the OAuth type.
| |||||||||||
Returns the OAuth Verifier.
| |||||||||||
Sets the Realm parameter.
| |||||||||||
| Protected Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Checks the given key to see if it exists, and throws an exception if it
does not.
| |||||||||||
Checks the given key to see if it exists.
| |||||||||||
Retrieves the value with the given key from the input map.
| |||||||||||
Adds the key/value pair to the input map.
| |||||||||||
Removes a key/value pair from the input map.
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
Adds a parameter to be used when generating the OAuth signature.
| key | The key used to reference this parameter. This key will also be used to reference the value in the request url and in the http authorization header. |
|---|---|
| value | The value of the parameter |
Sets a parameter related to OAuth (but not used when generating the signature).
| key | The key used to reference this parameter |
|---|---|
| value | The value of the parameter |
Checks to see if the OAuth callback exists. Throws an exception if
it does not. See getOAuthCallback() to learn more about this
parameter.
| OAuthException | if the OAuth callback does not exist |
|---|
Checks to see if the OAuth Consumer Key exists. Throws an exception if
it does not. See getOAuthConsumerKey() to learn more about this
parameter.
| OAuthException | if the OAuth Consumer Key does not exist |
|---|
Checks to see if the OAuth nonce exists. Throws an exception if
it does not. See getOAuthNonce() to learn more about this
parameter.
| OAuthException | if the OAuth nonce does not exist |
|---|
Checks to see if the OAuth signature exists. Throws an exception if
it does not. See getOAuthSignature() to learn more about this
parameter.
| OAuthException | if the OAuth signature does not exist |
|---|
Checks to see if the OAuth signature method exists. Throws an exception if
it does not. See getOAuthSignatureMethod() to learn more about
this parameter.
| OAuthException | if the OAuth signature method does not exist |
|---|
Checks to see if the OAuth timestamp exists. Throws an exception if
it does not. See getOAuthTimestamp() to learn more about this
parameter.
| OAuthException | if the OAuth timestamp does not exist |
|---|
Checks to see if the OAuth token exists. Throws an exception if
it does not. See getOAuthToken() to learn more about this
parameter.
| OAuthException | if the OAuth token does not exist |
|---|
Checks to see if the OAuth token secret exists. Throws an exception if
it does not. See getOAuthTokenSecret() to learn more about this
parameter.
| OAuthException | if the OAuth token secret does not exist |
|---|
Checks to see if the OAuth Verifier exists. Throws an exception if
it does not. See getOAuthVerifier() to learn more about this
parameter.
| OAuthException | if the OAuth token secret does not exist |
|---|
Checks to see if the realm exists. Throws an exception if it does not.
See getRealm() to learn more about this parameter.
| OAuthException | if the realm does not exist |
|---|
Checks to see if the OAuth callback exists. See
getOAuthCallback() to learn more about this parameter.
Checks to see if the OAuth Consumer Key exists. See
getOAuthConsumerKey() to learn more about this parameter.
Checks to see if the OAuth nonce exists. See getOAuthNonce() to
learn more about this parameter.
Checks to see if the OAuth signature exists. See
getOAuthSignature() to learn more about this parameter.
Checks to see if the OAuth signature method exists. See
getOAuthSignatureMethod() to learn more about this parameter.
Checks to see if the OAuth timestamp exists. See
getOAuthTimestamp() to learn more about this parameter.
Checks to see if the OAuth token exists. See getOAuthToken() to
learn more about this parameter.
Checks to see if the OAuth token secret exists. See
getOAuthTokenSecret() to learn more about this parameter.
Checks to see if the OAuth Verifier exists. See
getOAuthTokenSecret() to learn more about this parameter.
Checks to see if the realm exists. See getRealm() to learn more
about this parameter.
Return the parameters used to calculate the OAuth signature.
Returns any other parameters used in the OAuth process, such as the OAuth callback url.
Returns the OAuth callback url. The OAuth callback url is a url the Consumer provides to the Service Provider in the user authorization url. Once the user has authorized, the Service Provider will redirect the user back to the callback url with the user-authorized request token in the response. This parameter is optional.
Returns the OAuth Consumer Key. The OAuth Consumer Key is a value used by the Consumer to identify itself to the Service Provider. This parameter is required for all OAuth requests. This parameter is included in the OAuth signature base string.
Returns the OAuth nonce. OAuth defines the nonce as "a random string,
uniquely generated for each request. The nonce allows the Service Provider
to verify that a request has never been made before and helps prevent
replay attacks when requests are made over a non-secure channel (such as
HTTP)." This parameter is optional, and it will be supplied by
getNonce() if it is not provided. This parameter is
included in the OAuth signature base string.
Returns the OAuth signature used to sign the current request. This
parameter is optional, and it will be set by OAuthHelper if it is
not provided.
Returns the OAuth Signature Method. Valid values are "RSA-SHA1",
"HMAC-SHA1" and "PLAINTEXT". This parameter is optional, and will be
supplied by OAuthSigner if it is not provided by the user. This
parameter is included in the OAuth signature base string.
Returns the OAuth timestamp. OAuth defines the timestamp as "the number of
seconds since January 1, 1970 00:00:00 GMT. The timestamp value MUST be a
positive integer and MUST be equal or greater than the
timestamp used in previous requests." This parameter is optional, and will
be supplied by getTimestamp() if it is not provided by
the user. This parameter is included in the OAuth signature base string.
Returns the OAuth token. This token may either be the unauthorized
request token, the user-authorized request token, or the access token.
This parameter is optional, and will be modified by the methods in
OAuthHelper. This parameter is included in the OAuth signature
base string.
Returns the OAuth Token Secret. The OAuth Token Secret is a secret used by the Consumer to establish ownership of a given Token. This parameter is optional.
Returns the OAuth Verifier.
Returns the Realm parameter to be used in the authorization header, as defined by
Removes a parameter from the OAuth signature.
| key | The key used to reference this parameter. |
|---|
Resets all transient parameters related to a single request, so that these parameters do not interfere with multiple requests.
Sets the OAuth callback url. See getOAuthCallback() to learn more
about this parameter.
| oauthCallback |
|---|
Sets the OAuth Consumer Key. See getOAuthConsumerKey() to learn
more about this parameter.
| consumerKey |
|---|
| consumerSecret |
|---|
Sets the OAuth nonce. See getOAuthNonce() to learn more about
this parameter.
| oauthNonce |
|---|
Sets the OAuth signature used to sign the current request. See
getOAuthSignature() to learn more about this parameter.
| signature |
|---|
Sets the OAuth Signature Method. See getOAuthSignatureMethod() to
learn more about this parameter.
| signatureMethod |
|---|
Sets the OAuth timestamp. See getOAuthTimestamp() to learn more
about this parameter.
| timestamp |
|---|
Sets the OAuth token. See getOAuthToken() to learn more about
this parameter.
| token |
|---|
Returns the OAuth Token Secret. See getOAuthTokenSecret() to
learn more about this parameter.
| tokenSecret |
|---|
Sets the value of the OAuth type.
| type |
|---|
Returns the OAuth Verifier. See getOAuthVerifier() to
learn more about this parameter.
| verifier |
|---|
Sets the Realm parameter. See getRealm() to learn more about this
parameter.
| realm |
|---|
Checks the given key to see if it exists, and throws an exception if it
does not. See checkExists(String, Map for more information.
| key | The key to check for existence |
|---|---|
| params | The map to check for the key |
| OAuthException | if the value for the given key doesn't exist |
|---|
Checks the given key to see if it exists. In order to "exist", the value can't be null, and it can't be an empty string.
| key | The key to check for existence |
|---|---|
| params | The map to check for the key |
Retrieves the value with the given key from the input map. A null value is returned as an empty string.
| key | The key whose value to retrieve |
|---|---|
| params | The map from which to retrieve the value from |
Adds the key/value pair to the input map.
| key | The key to add to the map |
|---|---|
| value | The value to add to the map |
| params | The map to add the values to |
Removes a key/value pair from the input map.
| key | The key to remove |
|---|---|
| params | The map to remove the key from |