@Beta public final class OAuthHmacCredential extends Object implements Credential, javax.jdo.InstanceCallbacks
Beta OAuthHmacSigner to sign requests.
This class is both immutable and thread safe.| Constructor and Description |
|---|
OAuthHmacCredential(String userId,
String consumerKey,
String sharedSecret,
String tokenSharedSecret,
String token)
Create an OAuth 1 credential object from information obtained from the server.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
handleResponse(com.google.api.client.http.HttpRequest request,
com.google.api.client.http.HttpResponse response,
boolean retrySupported) |
void |
initialize(com.google.api.client.http.HttpRequest request) |
void |
intercept(com.google.api.client.http.HttpRequest request) |
boolean |
isInvalid()
Determine if the Credential is no longer valid, after being revoked for example.
|
void |
jdoPostLoad() |
void |
jdoPreClear() |
void |
jdoPreDelete() |
void |
jdoPreStore() |
public OAuthHmacCredential(String userId, String consumerKey, String sharedSecret, String tokenSharedSecret, String token)
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 nonepublic void initialize(com.google.api.client.http.HttpRequest request)
throws IOException
initialize in interface com.google.api.client.http.HttpRequestInitializerIOExceptionpublic void intercept(com.google.api.client.http.HttpRequest request)
throws IOException
intercept in interface com.google.api.client.http.HttpExecuteInterceptorIOExceptionpublic boolean handleResponse(com.google.api.client.http.HttpRequest request,
com.google.api.client.http.HttpResponse response,
boolean retrySupported)
handleResponse in interface com.google.api.client.http.HttpUnsuccessfulResponseHandlerpublic void jdoPreClear()
jdoPreClear in interface javax.jdo.listener.ClearCallbackpublic void jdoPreDelete()
jdoPreDelete in interface javax.jdo.listener.DeleteCallbackpublic void jdoPostLoad()
jdoPostLoad in interface javax.jdo.listener.LoadCallbackpublic void jdoPreStore()
jdoPreStore in interface javax.jdo.listener.StoreCallbackpublic boolean isInvalid()
CredentialisInvalid in interface CredentialCopyright © 2011-2013 Google. All Rights Reserved.