@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(HttpRequest request,
HttpResponse response,
boolean retrySupported) |
void |
initialize(HttpRequest request) |
void |
intercept(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(HttpRequest request) throws IOException
initialize
in interface HttpRequestInitializer
IOException
public void intercept(HttpRequest request) throws IOException
intercept
in interface HttpExecuteInterceptor
IOException
public boolean handleResponse(HttpRequest request, HttpResponse response, boolean retrySupported)
handleResponse
in interface HttpUnsuccessfulResponseHandler
public void jdoPreClear()
jdoPreClear
in interface javax.jdo.listener.ClearCallback
public void jdoPreDelete()
jdoPreDelete
in interface javax.jdo.listener.DeleteCallback
public void jdoPostLoad()
jdoPostLoad
in interface javax.jdo.listener.LoadCallback
public void jdoPreStore()
jdoPreStore
in interface javax.jdo.listener.StoreCallback
public boolean isInvalid()
Credential
isInvalid
in interface Credential
Copyright © 2011–2022 Google. All rights reserved.