com.google.api.client.googleapis.auth.oauth
Class GoogleOAuthDomainWideDelegation
java.lang.Object
com.google.api.client.googleapis.auth.oauth.GoogleOAuthDomainWideDelegation
- All Implemented Interfaces:
- com.google.api.client.http.HttpExecuteInterceptor, com.google.api.client.http.HttpRequestInitializer
public final class GoogleOAuthDomainWideDelegation
- extends Object
- implements com.google.api.client.http.HttpExecuteInterceptor, com.google.api.client.http.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
|
Field Summary |
com.google.api.client.auth.oauth.OAuthParameters |
parameters
OAuth parameters. |
String |
requestorId
Email address of the user whose data you are trying to access. |
|
Method Summary |
void |
initialize(com.google.api.client.http.HttpRequest request)
|
void |
intercept(com.google.api.client.http.HttpRequest request)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
requestorId
public String requestorId
- Email address of the user whose data you are trying to access.
parameters
public com.google.api.client.auth.oauth.OAuthParameters parameters
- OAuth parameters.
- Since:
- 1.4
GoogleOAuthDomainWideDelegation
public GoogleOAuthDomainWideDelegation()
initialize
public void initialize(com.google.api.client.http.HttpRequest request)
- Specified by:
initialize in interface com.google.api.client.http.HttpRequestInitializer
intercept
public void intercept(com.google.api.client.http.HttpRequest request)
throws IOException
- Specified by:
intercept in interface com.google.api.client.http.HttpExecuteInterceptor
- Throws:
IOException
Copyright © 2010-2011 Google. All Rights Reserved.