Google Data APIs Client Library (1.41.1)
com.google.gdata.client.authn.oauth
Class GoogleOAuthParameters
java.lang.Object
com.google.gdata.client.authn.oauth.OAuthParameters
com.google.gdata.client.authn.oauth.GoogleOAuthParameters
public class GoogleOAuthParameters
- extends OAuthParameters
Defines the parameters necessary for making OAuth requests against Google.
Currently the only parameter is "scope", which indicates the resources the
user can access.
Field Summary |
static java.lang.String |
SCOPE_KEY
|
Fields inherited from class com.google.gdata.client.authn.oauth.OAuthParameters |
baseParameters, extraParameters, OAUTH_CALLBACK_KEY, OAUTH_CONSUMER_KEY, OAUTH_CONSUMER_SECRET, OAUTH_KEY, OAUTH_NONCE_KEY, OAUTH_SIGNATURE_KEY, OAUTH_SIGNATURE_METHOD_KEY, OAUTH_TIMESTAMP_KEY, OAUTH_TOKEN_KEY, OAUTH_TOKEN_SECRET_KEY, OAUTH_VERIFIER_KEY, REALM_KEY, XOAUTH_REQUESTOR_ID_KEY |
Method Summary |
void |
assertScopeExists()
Checks to see if the scope exists. |
boolean |
checkScopeExists()
Checks to see if the scope exists. |
java.lang.String |
getScope()
Return the request scope. |
void |
reset()
Since the scope parameter may be different for each OAuth request, it is
cleared between requests, and must be manually set before each request. |
void |
setScope(java.lang.String scope)
Sets the request scope. |
Methods inherited from class com.google.gdata.client.authn.oauth.OAuthParameters |
addCustomBaseParameter, addExtraParameter, assertExists, assertOAuthCallbackExists, assertOAuthConsumerKeyExists, assertOAuthConsumerSecretExists, assertOAuthNonceExists, assertOAuthSignatureExists, assertOAuthSignatureMethodExists, assertOAuthTimestampExists, assertOAuthTokenExists, assertOAuthTokenSecretExists, assertOAuthVerifierExists, assertRealmExists, checkExists, checkOAuthCallbackExists, checkOAuthConsumerKeyExists, checkOAuthConsumerSecretExists, checkOAuthNonceExists, checkOAuthSignatureExists, checkOAuthSignatureMethodExists, checkOAuthTimestampExists, checkOAuthTokenExists, checkOAuthTokenSecretExists, checkOAuthVerifierExists, checkRealmExists, get, getBaseParameters, getExtraParameters, getOAuthCallback, getOAuthConsumerKey, getOAuthConsumerSecret, getOAuthNonce, getOAuthSignature, getOAuthSignatureMethod, getOAuthTimestamp, getOAuthToken, getOAuthTokenSecret, getOAuthType, getOAuthVerifier, getRealm, put, remove, removeCustomBaseParameter, setOAuthCallback, setOAuthConsumerKey, setOAuthConsumerSecret, setOAuthNonce, setOAuthSignature, setOAuthSignatureMethod, setOAuthTimestamp, setOAuthToken, setOAuthTokenSecret, setOAuthType, setOAuthVerifier, setRealm |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SCOPE_KEY
public static final java.lang.String SCOPE_KEY
- See Also:
- Constant Field Values
GoogleOAuthParameters
public GoogleOAuthParameters()
getScope
public java.lang.String getScope()
- Return the request scope. The scope is a URI defined by each Google
service that indicates which resources the user has permissions to access.
It is used when retrieving the unauthorized request token. Multiple scopes
are separated with a space. This parameter is required for OAuth requests
against Google.
setScope
public void setScope(java.lang.String scope)
- Sets the request scope. See
getScope()
to learn more about this
parameter.
checkScopeExists
public boolean checkScopeExists()
- Checks to see if the scope exists. See
getScope()
to learn more
about this parameter.
- Returns:
- true if the scope exists, false otherwise
assertScopeExists
public void assertScopeExists()
throws OAuthException
- Checks to see if the scope exists. Throws an exception if it does not.
See
getScope()
to learn more about this parameter.
- Throws:
OAuthException
- if the scope does not exist
reset
public void reset()
- Since the scope parameter may be different for each OAuth request, it is
cleared between requests, and must be manually set before each request.
- Overrides:
reset
in class OAuthParameters