|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface OAuthDataStore
A class that manages the OAuth data for Shindig, including storing the map of consumer key/secrets, storing request and access tokens, and providing a way to upgrade tokens to authorized values.
| Method Summary | |
|---|---|
void |
authorizeToken(OAuthEntry entry,
String userId)
Authorize the request token for the given user id. |
OAuthEntry |
convertToAccessToken(OAuthEntry entry)
Called when converting a request token to an access token. |
void |
disableToken(OAuthEntry entry)
Mark a token DISABLED and store it. |
OAuthEntry |
generateRequestToken(String consumerKey,
String oauthVersion,
String signedCallbackUrl,
String virtualOrganization)
Generate a valid requestToken for the given consumerKey. |
net.oauth.OAuthConsumer |
getConsumer(String consumerKey)
Lookup consumers. |
OAuthEntry |
getEntry(String oauthToken)
Get the OAuthEntry that corresponds to the oauthToken. |
SecurityToken |
getSecurityTokenForConsumerRequest(String consumerKey,
String userId,
net.oauth.OAuthConsumer authConsumer)
Return the proper security token for a 2 legged oauth request that has been validated for the given consumerKey. |
void |
removeToken(OAuthEntry entry)
Remove a token |
| Method Detail |
|---|
OAuthEntry getEntry(String oauthToken)
oauthToken - a non-null oauthToken
SecurityToken getSecurityTokenForConsumerRequest(String consumerKey,
String userId,
net.oauth.OAuthConsumer authConsumer)
throws net.oauth.OAuthProblemException
consumerKey - A consumer keyuserId - The userId to validate.authConsumer - The OAuthConsumer
net.oauth.OAuthProblemException - when there are errors
net.oauth.OAuthConsumer getConsumer(String consumerKey)
throws net.oauth.OAuthProblemException
consumerKey - A valid, non-null ConsumerKey
net.oauth.OAuthProblemException - when the implementing class wants to signal errors
OAuthEntry generateRequestToken(String consumerKey,
String oauthVersion,
String signedCallbackUrl,
String virtualOrganization)
throws net.oauth.OAuthProblemException
consumerKey - A valid consumer keyoauthVersion - The version (1 or 1a)signedCallbackUrl - Callback URL sent from consumer, may be null. If callbackUrl is not
null then the returned entry should have signedCallbackUrl set to true.virtualOrganization - the virtualOrganization context (if any)
net.oauth.OAuthProblemException - when the implementing class wants to control the error response
OAuthEntry convertToAccessToken(OAuthEntry entry)
throws net.oauth.OAuthProblemException
entry - The Entry to convert
net.oauth.OAuthProblemException - when the implementing class wants to control the error response
void authorizeToken(OAuthEntry entry,
String userId)
throws net.oauth.OAuthProblemException
entry - A valid OAuthEntryuserId - A user id
net.oauth.OAuthProblemException - when the implementing class wants to control the error responsevoid disableToken(OAuthEntry entry)
entry - A valid OAuthEntryvoid removeToken(OAuthEntry entry)
entry - A valid OAuthEntry
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||