public class

GoogleOAuthParameters

extends OAuthParameters
java.lang.Object
   ↳ com.google.gdata.client.authn.oauth.OAuthParameters
     ↳ com.google.gdata.client.authn.oauth.GoogleOAuthParameters

Class Overview

Defines the parameters necessary for making OAuth requests against Google. Currently the only parameter is "scope", which indicates the resources the user can access.

Summary

Constants
String SCOPE_KEY
[Expand]
Inherited Constants
From class com.google.gdata.client.authn.oauth.OAuthParameters
[Expand]
Inherited Fields
From class com.google.gdata.client.authn.oauth.OAuthParameters
Public Constructors
GoogleOAuthParameters()
Public Methods
void assertScopeExists()
Checks to see if the scope exists.
boolean checkScopeExists()
Checks to see if the scope exists.
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(String scope)
Sets the request scope.
[Expand]
Inherited Methods
From class com.google.gdata.client.authn.oauth.OAuthParameters
From class java.lang.Object

Constants

public static final String SCOPE_KEY

Constant Value: "scope"

Public Constructors

public GoogleOAuthParameters ()

Public Methods

public void assertScopeExists ()

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

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

public 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.

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.

public void setScope (String scope)

Sets the request scope. See getScope() to learn more about this parameter.

Parameters
scope