|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface OAuthStore
Interface to an OAuth Data Store. A shindig gadget server can act as an OAuth consumer, using OAuth tokens to talk to OAuth service providers on behalf of the gadgets it is proxying requests for. An OAuth consumer needs to permanently store gadgets it has collected, and retrieve the appropriate tokens when proxying a request for a gadget. An OAuth Data Store stores three things: (1) information about OAuth service providers, including the three URLs that define OAuth providers (defined in OAuthStore.ProviderInfo) (2) information about consumer keys and secrets that gadgets might have negotiated with OAuth service providers, or that containers might have negotiated on behalf of the gadgets. This information is bound to the service provider it pertains to and can only be stored if the corresponding service provider information is already stored in the OAuth store (defined in OAuthStore.ConsumerKeyAndSecret). (3) OAuth access tokens and their corresponding token secrets. (defined in OAuthStore.TokenInfo). Note that we do not store request tokens in the OAuth store.
| Nested Class Summary | |
|---|---|
static class |
OAuthStore.ConsumerInfo
Information about an OAuth consumer. |
static class |
OAuthStore.TokenInfo
Information about an access token. |
| Method Summary | |
|---|---|
OAuthStore.ConsumerInfo |
getConsumerKeyAndSecret(SecurityToken securityToken,
String serviceName,
net.oauth.OAuthServiceProvider provider)
Retrieve OAuth consumer to use for requests. |
OAuthStore.TokenInfo |
getTokenInfo(SecurityToken securityToken,
OAuthStore.ConsumerInfo consumerInfo,
String serviceName,
String tokenName)
Retrieve OAuth access token to use for the request. |
void |
removeToken(SecurityToken securityToken,
OAuthStore.ConsumerInfo consumerInfo,
String serviceName,
String tokenName)
Remove the access token for the given user/gadget/service/token |
void |
setTokenInfo(SecurityToken securityToken,
OAuthStore.ConsumerInfo consumerInfo,
String serviceName,
String tokenName,
OAuthStore.TokenInfo tokenInfo)
Set the access token for the given user/gadget/service/token |
| Method Detail |
|---|
OAuthStore.ConsumerInfo getConsumerKeyAndSecret(SecurityToken securityToken,
String serviceName,
net.oauth.OAuthServiceProvider provider)
throws GadgetException
securityToken - token for user/gadget making request.serviceName - gadget's nickname for the service being accessed.provider - OAuth service provider info to be inserted into the returned consumer.
GadgetException - if no OAuth consumer can be found (e.g. no consumer key can be used.)
OAuthStore.TokenInfo getTokenInfo(SecurityToken securityToken,
OAuthStore.ConsumerInfo consumerInfo,
String serviceName,
String tokenName)
throws GadgetException
securityToken - token for user/gadget making request.consumerInfo - OAuth consumer that will be used for the request.serviceName - gadget's nickname for the service being accessed.tokenName - gadget's nickname for the token to use.
GadgetException - if an error occurs during lookup
void setTokenInfo(SecurityToken securityToken,
OAuthStore.ConsumerInfo consumerInfo,
String serviceName,
String tokenName,
OAuthStore.TokenInfo tokenInfo)
throws GadgetException
GadgetException
void removeToken(SecurityToken securityToken,
OAuthStore.ConsumerInfo consumerInfo,
String serviceName,
String tokenName)
throws GadgetException
GadgetException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||