com.google.api.client.googleapis.auth.oauth
Class GoogleOAuthDomainWideDelegation

java.lang.Object
  extended by com.google.api.client.googleapis.auth.oauth.GoogleOAuthDomainWideDelegation
All Implemented Interfaces:
HttpExecuteInterceptor, HttpRequestInitializer

Deprecated. (scheduled to be removed in 1.11) Use GoogleCredential

@Deprecated
public final class GoogleOAuthDomainWideDelegation
extends Object
implements HttpExecuteInterceptor, HttpRequestInitializer

Google's OAuth domain-wide delegation requires an e-mail address of the user whose data you are trying to access via requestorId on every HTTP request.

Sample usage, taking advantage that this class implements HttpRequestInitializer:

  public static HttpRequestFactory createRequestFactory(HttpTransport transport) {
    GoogleOAuthDomainWideDelegation initializer = new GoogleOAuthDomainWideDelegation();
    initializer.requestorId = "...";
    OAuthParameters parameters = new OAuthParameters();
    // parameters...
    initializer.parameters = parameters;
    return transport.createRequestFactory(initializer);
  }
 

If you have a custom request initializer, take a look at the sample usage for HttpExecuteInterceptor, which this class also implements.

Since:
1.0
Author:
Yaniv Inbar

Nested Class Summary
static class GoogleOAuthDomainWideDelegation.Url
          Deprecated. Generic URL that extends GoogleUrl and also provides the GoogleOAuthDomainWideDelegation.Url.requestorId parameter.
 
Field Summary
 OAuthParameters parameters
          Deprecated. OAuth parameters.
 String requestorId
          Deprecated. Email address of the user whose data you are trying to access.
 
Constructor Summary
GoogleOAuthDomainWideDelegation()
          Deprecated.  
 
Method Summary
 void initialize(HttpRequest request)
          Deprecated.  
 void intercept(HttpRequest request)
          Deprecated.  
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

requestorId

public String requestorId
Deprecated. 
Email address of the user whose data you are trying to access.


parameters

public OAuthParameters parameters
Deprecated. 
OAuth parameters.

Since:
1.4
Constructor Detail

GoogleOAuthDomainWideDelegation

public GoogleOAuthDomainWideDelegation()
Deprecated. 
Method Detail

initialize

public void initialize(HttpRequest request)
Deprecated. 
Specified by:
initialize in interface HttpRequestInitializer

intercept

public void intercept(HttpRequest request)
               throws IOException
Deprecated. 
Specified by:
intercept in interface HttpExecuteInterceptor
Throws:
IOException


Copyright © 2010-2012 Google. All Rights Reserved.