com.google.api.client.extensions.auth.helpers.oauth
Class OAuthHmacCredential
java.lang.Object
com.google.api.client.extensions.auth.helpers.oauth.OAuthHmacCredential
- All Implemented Interfaces:
- Credential, HttpExecuteInterceptor, HttpRequestInitializer, HttpUnsuccessfulResponseHandler, javax.jdo.InstanceCallbacks, javax.jdo.listener.ClearCallback, javax.jdo.listener.DeleteCallback, javax.jdo.listener.LoadCallback, javax.jdo.listener.StoreCallback
public final class OAuthHmacCredential
- extends Object
- implements Credential, javax.jdo.InstanceCallbacks
OAuth 1 credential which uses the OAuthHmacSigner to sign requests.
This class is both immutable and thread safe.
- Since:
- 1.5
- Author:
- moshenko@google.com (Jacob Moshenko)
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OAuthHmacCredential
public OAuthHmacCredential(String userId,
String consumerKey,
String sharedSecret,
String tokenSharedSecret,
String token)
- Create an OAuth 1 credential object from information obtained from the server.
- Parameters:
userId - User ID key that can be used to associate this credential with a user.consumerKey - Key that identifies the server to the service provider.sharedSecret - Secret that the server shares with the service provider.tokenSharedSecret - Token secret that server uses to authenticate the requests.token - Token that has been authorized by the end user to allow the server to access the
resources or null for none
initialize
public void initialize(HttpRequest request)
throws IOException
- Specified by:
initialize in interface HttpRequestInitializer
- Throws:
IOException
intercept
public void intercept(HttpRequest request)
throws IOException
- Specified by:
intercept in interface HttpExecuteInterceptor
- Throws:
IOException
handleResponse
public boolean handleResponse(HttpRequest request,
HttpResponse response,
boolean retrySupported)
- Specified by:
handleResponse in interface HttpUnsuccessfulResponseHandler
jdoPreClear
public void jdoPreClear()
- Specified by:
jdoPreClear in interface javax.jdo.listener.ClearCallback
jdoPreDelete
public void jdoPreDelete()
- Specified by:
jdoPreDelete in interface javax.jdo.listener.DeleteCallback
jdoPostLoad
public void jdoPostLoad()
- Specified by:
jdoPostLoad in interface javax.jdo.listener.LoadCallback
jdoPreStore
public void jdoPreStore()
- Specified by:
jdoPreStore in interface javax.jdo.listener.StoreCallback
isInvalid
public boolean isInvalid()
- Description copied from interface:
Credential
- Determine if the Credential is no longer valid, after being revoked for example.
- Specified by:
isInvalid in interface Credential
Copyright © 2011-2012 Google. All Rights Reserved.