Class OAuthHmacCredential (1.36.0)

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
Name Description
userId String

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

consumerKey String

Key that identifies the server to the service provider.

sharedSecret String

Secret that the server shares with the service provider.

tokenSharedSecret String

Token secret that server uses to authenticate the requests.

token String

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
Name Description
request com.google.api.client.http.HttpRequest
response com.google.api.client.http.HttpResponse
retrySupported boolean
Returns
Type Description
boolean

initialize(HttpRequest request)

public void initialize(HttpRequest request)
Parameter
Name Description
request com.google.api.client.http.HttpRequest
Exceptions
Type Description
IOException

intercept(HttpRequest request)

public void intercept(HttpRequest request)
Parameter
Name Description
request com.google.api.client.http.HttpRequest
Exceptions
Type Description
IOException

isInvalid()

public boolean isInvalid()

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

Returns
Type Description
boolean

jdoPostLoad()

public void jdoPostLoad()

jdoPreClear()

public void jdoPreClear()

jdoPreDelete()

public void jdoPreDelete()

jdoPreStore()

public void jdoPreStore()