public interface

OAuthManager

org.mule.modules.janrain.oauth.OAuthManager<C extends org.mule.modules.janrain.oauth.OAuthAdapter>

Class Overview

Wrapper around org.mule.api.annotations.oauth.OAuth annotated class that will infuse it with access token management capabilities.

It can receive a org.mule.config.PoolingProfile which is a configuration object used to define the OAuth access tokens pooling parameters.

Summary

Public Methods
abstract C acquireAccessToken(String userId)
Borrow an access token from the pool
abstract C createAccessToken(String verifier)
Create a new access token using the specified verifier and insert it into the pool
abstract void destroyAccessToken(String userId, C connector)
Destroy an access token
abstract C getDefaultUnauthorizedConnector()
Retrieve default unauthorized connector
abstract void releaseAccessToken(String userId, C connector)
Return an access token to the pool

Public Methods

public abstract C acquireAccessToken (String userId)

Borrow an access token from the pool

Parameters
userId User identification used to borrow the access token
Returns
  • An existing authorized connector
Throws
Exception If the access token cannot be retrieved

public abstract C createAccessToken (String verifier)

Create a new access token using the specified verifier and insert it into the pool

Parameters
verifier OAuth verifier
Returns
  • A newly created connector
Throws
Exception If the access token cannot be retrieved

public abstract void destroyAccessToken (String userId, C connector)

Destroy an access token

Parameters
userId User identification used to borrow the access token
connector Authorized connector to the destroyed
Throws
Exception If the access token could not be destroyed.

public abstract C getDefaultUnauthorizedConnector ()

Retrieve default unauthorized connector

public abstract void releaseAccessToken (String userId, C connector)

Return an access token to the pool

Parameters
userId User identification used to borrow the access token
connector Authorized connector to be returned to the pool
Throws
Exception If the access token cannot be returned