org.mule.security.oauth
Interface OAuth2Adapter

All Superinterfaces:
NameableObject, NamedObject, OAuth2Connector, OAuthAdapter, OnNoTokenPolicyAware, Serializable

public interface OAuth2Adapter
extends OAuthAdapter, OAuth2Connector, NameableObject


Method Summary
 String authorize(Map<String,String> extraParameters, String accessTokenUrl, String redirectUri)
          Build authorization URL and create the inbound endpoint for the callback
 void fetchAccessToken(String accessTokenUrl)
          Acquire access token and secret
 Pattern getAccessCodePattern()
          Returns a compiled Pattern which can be used to extract the access code from a String
 String getAccessToken()
          Retrieve access token
 Pattern getExpirationTimePattern()
          Returns a compiled Pattern which can be used to extract the expiration time from a String
 String getRefreshToken()
          Retrieve refresh token
 Pattern getRefreshTokenPattern()
          Returns a compiled Pattern which can be used to extract the refresh token from a String
 boolean hasTokenExpired()
           
 void refreshAccessToken(String accessTokenId)
           
 void setConsumerKey(String consumerKey)
           
 void setConsumerSecret(String consumerSecret)
           
 void setExpiration(Date value)
          Sets expiration
 void setRefreshToken(String refreshToken)
          Set refresh token
 
Methods inherited from interface org.mule.security.oauth.OAuthAdapter
getOauthVerifier, hasBeenAuthorized, setAccessToken, setAccessTokenUrl, setAuthorizationUrl, setOauthVerifier
 
Methods inherited from interface org.mule.security.oauth.OnNoTokenPolicyAware
getOnNoTokenPolicy, setOnNoTokenPolicy
 
Methods inherited from interface org.mule.security.oauth.OAuth2Connector
getAccessTokenRegex, getAccessTokenUrl, getAuthorizationParameters, getAuthorizationUrl, getConsumerKey, getConsumerSecret, getExpirationRegex, getRefreshTokenRegex, getScope, getVerifierRegex, postAuth
 
Methods inherited from interface org.mule.api.NameableObject
setName
 
Methods inherited from interface org.mule.api.NamedObject
getName
 

Method Detail

authorize

String authorize(Map<String,String> extraParameters,
                 String accessTokenUrl,
                 String redirectUri)
                 throws org.mule.common.security.oauth.exception.UnableToAcquireRequestTokenException
Build authorization URL and create the inbound endpoint for the callback

Parameters:
extraParameters - Extra query string parameters that should be added to the authorization URL
Returns:
The authorization URL
Throws:
org.mule.common.security.oauth.exception.UnableToAcquireRequestTokenException

fetchAccessToken

void fetchAccessToken(String accessTokenUrl)
                      throws org.mule.common.security.oauth.exception.UnableToAcquireAccessTokenException
Acquire access token and secret

Throws:
org.mule.common.security.oauth.exception.UnableToAcquireAccessTokenException

hasTokenExpired

boolean hasTokenExpired()

refreshAccessToken

void refreshAccessToken(String accessTokenId)
                        throws org.mule.common.security.oauth.exception.UnableToAcquireAccessTokenException
Parameters:
accessTokenId -
Throws:
org.mule.common.security.oauth.exception.UnableToAcquireAccessTokenException

getAccessToken

String getAccessToken()
Retrieve access token

Specified by:
getAccessToken in interface OAuth2Connector

getAccessCodePattern

Pattern getAccessCodePattern()
Returns a compiled Pattern which can be used to extract the access code from a String


getRefreshToken

String getRefreshToken()
Retrieve refresh token


setRefreshToken

void setRefreshToken(String refreshToken)
Set refresh token


getRefreshTokenPattern

Pattern getRefreshTokenPattern()
Returns a compiled Pattern which can be used to extract the refresh token from a String


getExpirationTimePattern

Pattern getExpirationTimePattern()
Returns a compiled Pattern which can be used to extract the expiration time from a String


setExpiration

void setExpiration(Date value)
Sets expiration


setConsumerKey

void setConsumerKey(String consumerKey)

setConsumerSecret

void setConsumerSecret(String consumerSecret)


Copyright © 2003-2014 MuleSoft, Inc.. All Rights Reserved.