public class OSEOAuthStore extends Object implements org.apache.shindig.gadgets.oauth.OAuthStore
| Constructor and Description |
|---|
OSEOAuthStore()
Token store for the OpenSocial Explorer.
|
| Modifier and Type | Method and Description |
|---|---|
org.apache.shindig.gadgets.oauth.OAuthStore.ConsumerInfo |
getConsumerKeyAndSecret(org.apache.shindig.auth.SecurityToken securityToken,
String serviceName,
net.oauth.OAuthServiceProvider provider) |
org.apache.shindig.gadgets.oauth.OAuthStore.TokenInfo |
getTokenInfo(org.apache.shindig.auth.SecurityToken securityToken,
org.apache.shindig.gadgets.oauth.OAuthStore.ConsumerInfo consumerInfo,
String serviceName,
String tokenName) |
void |
init(String config)
Initializes the key and secret store from a JSON string.
|
void |
removeToken(org.apache.shindig.auth.SecurityToken securityToken,
org.apache.shindig.gadgets.oauth.OAuthStore.ConsumerInfo consumerInfo,
String serviceName,
String tokenName) |
void |
setAuthority(org.apache.shindig.common.servlet.Authority authority)
Sets the authority to use for OAuth services.
|
void |
setDefaultCallbackUrl(String url)
Sets the default callback URL to use for OAuth services.
|
void |
setTokenInfo(org.apache.shindig.auth.SecurityToken securityToken,
org.apache.shindig.gadgets.oauth.OAuthStore.ConsumerInfo consumerInfo,
String serviceName,
String tokenName,
org.apache.shindig.gadgets.oauth.OAuthStore.TokenInfo tokenInfo) |
public void init(String config)
{
"ServiceName" : {
"consumer_key" : "<Your Consumer Key>",
"consumer_secret" : "<Your Consumer Secret>",
"key_type" : "HMAC_SYMMETRIC",
"callback_url" : "http://localhost:8080/gadgets/oauthcallback"
}
}
config - JSON configuration String.public org.apache.shindig.gadgets.oauth.OAuthStore.ConsumerInfo getConsumerKeyAndSecret(org.apache.shindig.auth.SecurityToken securityToken,
String serviceName,
net.oauth.OAuthServiceProvider provider)
throws org.apache.shindig.gadgets.GadgetException
getConsumerKeyAndSecret in interface org.apache.shindig.gadgets.oauth.OAuthStoreorg.apache.shindig.gadgets.GadgetExceptionpublic org.apache.shindig.gadgets.oauth.OAuthStore.TokenInfo getTokenInfo(org.apache.shindig.auth.SecurityToken securityToken,
org.apache.shindig.gadgets.oauth.OAuthStore.ConsumerInfo consumerInfo,
String serviceName,
String tokenName)
throws org.apache.shindig.gadgets.GadgetException
getTokenInfo in interface org.apache.shindig.gadgets.oauth.OAuthStoreorg.apache.shindig.gadgets.GadgetExceptionpublic void setTokenInfo(org.apache.shindig.auth.SecurityToken securityToken,
org.apache.shindig.gadgets.oauth.OAuthStore.ConsumerInfo consumerInfo,
String serviceName,
String tokenName,
org.apache.shindig.gadgets.oauth.OAuthStore.TokenInfo tokenInfo)
throws org.apache.shindig.gadgets.GadgetException
setTokenInfo in interface org.apache.shindig.gadgets.oauth.OAuthStoreorg.apache.shindig.gadgets.GadgetExceptionpublic void removeToken(org.apache.shindig.auth.SecurityToken securityToken,
org.apache.shindig.gadgets.oauth.OAuthStore.ConsumerInfo consumerInfo,
String serviceName,
String tokenName)
throws org.apache.shindig.gadgets.GadgetException
removeToken in interface org.apache.shindig.gadgets.oauth.OAuthStoreorg.apache.shindig.gadgets.GadgetExceptionpublic void setDefaultCallbackUrl(String url)
url - Default callback URL.public void setAuthority(org.apache.shindig.common.servlet.Authority authority)
authority - The authority.Copyright © 2013 OpenSocial Foundation. All Rights Reserved.