com.atlassian.gadgets.renderer.internal.oauth
Class AtlassianOAuthStore
java.lang.Object
com.atlassian.gadgets.renderer.internal.oauth.AtlassianOAuthStore
- All Implemented Interfaces:
- org.apache.shindig.gadgets.oauth.OAuthStore
public class AtlassianOAuthStore
- extends Object
- implements org.apache.shindig.gadgets.oauth.OAuthStore
Implementation of the OAuthStore
interface that uses the ConsumerService
and ConsumerTokenStore
from the Atlassian OAuth Consumer Plugin to get consumer information and store tokens. This implementation does
not support per gadget Consumer settings, and only returns the applications Consumer information.
Nested classes/interfaces inherited from interface org.apache.shindig.gadgets.oauth.OAuthStore |
org.apache.shindig.gadgets.oauth.OAuthStore.ConsumerInfo, org.apache.shindig.gadgets.oauth.OAuthStore.TokenInfo |
Constructor Summary |
AtlassianOAuthStore(com.atlassian.oauth.consumer.ConsumerService consumerService,
com.atlassian.oauth.consumer.ConsumerTokenStore tokenStore,
com.atlassian.sal.api.ApplicationProperties applicationProperties)
|
Method Summary |
org.apache.shindig.gadgets.oauth.OAuthStore.ConsumerInfo |
getConsumerKeyAndSecret(org.apache.shindig.auth.SecurityToken securityToken,
String service,
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 |
removeToken(org.apache.shindig.auth.SecurityToken securityToken,
org.apache.shindig.gadgets.oauth.OAuthStore.ConsumerInfo consumerInfo,
String serviceName,
String tokenName)
|
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)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AtlassianOAuthStore
@Inject
public AtlassianOAuthStore(com.atlassian.oauth.consumer.ConsumerService consumerService,
com.atlassian.oauth.consumer.ConsumerTokenStore tokenStore,
com.atlassian.sal.api.ApplicationProperties applicationProperties)
getConsumerKeyAndSecret
public org.apache.shindig.gadgets.oauth.OAuthStore.ConsumerInfo getConsumerKeyAndSecret(org.apache.shindig.auth.SecurityToken securityToken,
String service,
net.oauth.OAuthServiceProvider provider)
throws org.apache.shindig.gadgets.GadgetException
- Specified by:
getConsumerKeyAndSecret
in interface org.apache.shindig.gadgets.oauth.OAuthStore
- Throws:
org.apache.shindig.gadgets.GadgetException
getTokenInfo
public 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
- Specified by:
getTokenInfo
in interface org.apache.shindig.gadgets.oauth.OAuthStore
- Throws:
org.apache.shindig.gadgets.GadgetException
setTokenInfo
public 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
- Specified by:
setTokenInfo
in interface org.apache.shindig.gadgets.oauth.OAuthStore
- Throws:
org.apache.shindig.gadgets.GadgetException
removeToken
public 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
- Specified by:
removeToken
in interface org.apache.shindig.gadgets.oauth.OAuthStore
- Throws:
org.apache.shindig.gadgets.GadgetException
Copyright © 2014 Atlassian. All Rights Reserved.