|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface OAuthProvider
Implement this interface to provide the RESTEasy servlets and filters with the knowledge to load and store OAuth Consumer, Request and Access Tokens.
Method Summary | |
---|---|
java.lang.String |
authoriseRequestToken(java.lang.String consumerKey,
java.lang.String requestToken)
Authorises the given Request Token for the given Consumer and return a new Verifier to be returned to the Client. |
void |
checkTimestamp(OAuthToken token,
long timestamp)
Checks that the given timestamp is valid for the given OAuth Token. |
OAuthToken |
getAccessToken(java.lang.String consumerKey,
java.lang.String accessToken)
Returns the OAuth Access Token for the given Consumer key and Access Token. |
OAuthConsumer |
getConsumer(java.lang.String consumerKey)
Returns the OAuth Consumer for the given Consumer key. |
java.lang.String |
getRealm()
Returns the Realm of this provider |
OAuthRequestToken |
getRequestToken(java.lang.String consumerKey,
java.lang.String requestToken)
Returns the OAuth Request Token for the given Consumer key and Request Token. |
OAuthToken |
makeAccessToken(java.lang.String consumerKey,
java.lang.String requestToken,
java.lang.String verifier)
Make a new OAuth Access Token for the given Consumer, using the given Request Token and Verifier. |
OAuthToken |
makeRequestToken(java.lang.String consumerKey,
java.lang.String callback,
java.lang.String[] scopes,
java.lang.String[] permissions)
Make a new OAuth Request Token for the given Consumer, using the given callback. |
Methods inherited from interface org.jboss.resteasy.auth.oauth.OAuthConsumerRegistration |
---|
registerConsumer, registerConsumerPermissions, registerConsumerScopes |
Method Detail |
---|
java.lang.String getRealm()
OAuthConsumer getConsumer(java.lang.String consumerKey) throws OAuthException
consumerKey
- the Consumer key to load.
OAuthException
- thrown if the given Consumer does not exist.OAuthRequestToken getRequestToken(java.lang.String consumerKey, java.lang.String requestToken) throws OAuthException
consumerKey
- the Consumer key whose Request Token we want to loadrequestToken
- the Request Token to load
OAuthException
- thrown if the given Request Token does not exist.OAuthToken getAccessToken(java.lang.String consumerKey, java.lang.String accessToken) throws OAuthException
consumerKey
- the Consumer key whose Access Token we want to loadaccesToken
- the Access Token to load
OAuthException
- thrown if the given Consumer or Access Token do not exist.OAuthToken makeRequestToken(java.lang.String consumerKey, java.lang.String callback, java.lang.String[] scopes, java.lang.String[] permissions) throws OAuthException
consumerKey
- the Consumer key for whom to create a new Request Tokencallback
- the Client-specified callback for this Request Tokenscopes
- resource URIs the consumer would like to accessscopes
- permissions the consumer is requesting
OAuthException
- thrown if the given Consumer does not existOAuthToken makeAccessToken(java.lang.String consumerKey, java.lang.String requestToken, java.lang.String verifier) throws OAuthException
consumerKey
- the Consumer key for whom to create a new Access TokenrequestToken
- the Request Token to exchange for a new Access Tokenverifier
- the Client-specified Verifier that must match the Verifier that was given to the Client
when the given Request Token was authorised.
OAuthException
- thrown if the given Consumer or Request Token does not exist, if the Request Token is not authorised
or if the Verifier is invalid.java.lang.String authoriseRequestToken(java.lang.String consumerKey, java.lang.String requestToken) throws OAuthException
consumerKey
- the Consumer Key whose Request Token we want to authoriserequestToken
- the Request Token to authorise
OAuthException
- thrown if the given Consumer or Request Token do not exist, or if the Request Token has already been authorised.void checkTimestamp(OAuthToken token, long timestamp) throws OAuthException
token
- the OAuth Token whose timestamp to check and save if validtimestamp
- the timestamp to check and save if valid
OAuthException
- thrown if the given timestamp is not greater or equal to the last timestamp associated
with the given OAuth Token
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |