Class OAuthHmacCredential (1.32.1)

public final class OAuthHmacCredential implements Credential, InstanceCallbacks

Beta
OAuth 1 credential which uses the OAuthHmacSigner to sign requests.

This class is both immutable and thread safe.

Inheritance

java.lang.Object > OAuthHmacCredential

Constructors

OAuthHmacCredential(String userId, String consumerKey, String sharedSecret, String tokenSharedSecret, String token)

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
NameDescription
userIdString

User ID key that can be used to associate this credential with a user.

consumerKeyString

Key that identifies the server to the service provider.

sharedSecretString

Secret that the server shares with the service provider.

tokenSharedSecretString

Token secret that server uses to authenticate the requests.

tokenString

Token that has been authorized by the end user to allow the server to access the resources or null for none

Methods

handleResponse(HttpRequest request, HttpResponse response, boolean retrySupported)

public boolean handleResponse(HttpRequest request, HttpResponse response, boolean retrySupported)
Parameters
NameDescription
requestcom.google.api.client.http.HttpRequest
responsecom.google.api.client.http.HttpResponse
retrySupportedboolean
Returns
TypeDescription
boolean

initialize(HttpRequest request)

public void initialize(HttpRequest request)
Parameter
NameDescription
requestcom.google.api.client.http.HttpRequest
Exceptions
TypeDescription
IOException

intercept(HttpRequest request)

public void intercept(HttpRequest request)
Parameter
NameDescription
requestcom.google.api.client.http.HttpRequest
Exceptions
TypeDescription
IOException

isInvalid()

public boolean isInvalid()

Determine if the Credential is no longer valid, after being revoked for example.

Returns
TypeDescription
boolean

jdoPostLoad()

public void jdoPostLoad()

jdoPreClear()

public void jdoPreClear()

jdoPreDelete()

public void jdoPreDelete()

jdoPreStore()

public void jdoPreStore()