public interface OAuth2Adapter extends OAuthAdapter, OAuth2Connector, NameableObject
Modifier and Type | Method and Description |
---|---|
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
|
getOauthVerifier, hasBeenAuthorized, setAccessToken, setAccessTokenUrl, setAuthorizationUrl, setOauthVerifier
getOnNoTokenPolicy, setOnNoTokenPolicy
getAccessTokenRegex, getAccessTokenUrl, getAuthorizationParameters, getAuthorizationUrl, getConsumerKey, getConsumerSecret, getExpirationRegex, getRefreshTokenRegex, getScope, getVerifierRegex, postAuth
setName
getName
String authorize(Map<String,String> extraParameters, String accessTokenUrl, String redirectUri) throws org.mule.common.security.oauth.exception.UnableToAcquireRequestTokenException
extraParameters
- Extra query string parameters that should be added to
the authorization URLorg.mule.common.security.oauth.exception.UnableToAcquireRequestTokenException
void fetchAccessToken(String accessTokenUrl) throws org.mule.common.security.oauth.exception.UnableToAcquireAccessTokenException
org.mule.common.security.oauth.exception.UnableToAcquireAccessTokenException
boolean hasTokenExpired()
void refreshAccessToken(String accessTokenId) throws org.mule.common.security.oauth.exception.UnableToAcquireAccessTokenException
accessTokenId
- org.mule.common.security.oauth.exception.UnableToAcquireAccessTokenException
String getAccessToken()
getAccessToken
in interface OAuth2Connector
Pattern getAccessCodePattern()
Pattern
which can be used to
extract the access code from a StringString getRefreshToken()
void setRefreshToken(String refreshToken)
Pattern getRefreshTokenPattern()
Pattern
which can be used to
extract the refresh token from a StringPattern getExpirationTimePattern()
Pattern
which can be used to
extract the expiration time from a Stringvoid setExpiration(Date value)
void setConsumerKey(String consumerKey)
void setConsumerSecret(String consumerSecret)
Copyright © 2003–2015 MuleSoft, Inc.. All rights reserved.