com.atlassian.jira.oauth.serviceprovider
Class OfBizServiceProviderTokenStore

java.lang.Object
  extended by com.atlassian.jira.oauth.serviceprovider.OfBizServiceProviderTokenStore
All Implemented Interfaces:
com.atlassian.oauth.serviceprovider.ServiceProviderTokenStore

public class OfBizServiceProviderTokenStore
extends Object
implements com.atlassian.oauth.serviceprovider.ServiceProviderTokenStore

Provides an OfBiz implementation of the OAuth Service Provider token store. That is OAuth tokens that are used to process incoming requests.

Since:
v4.0

Field Summary
static String PROPERTY_SET_KEY
           
static String TABLE
           
 
Constructor Summary
OfBizServiceProviderTokenStore(OfBizDelegator delegator, UserUtil userUtil, com.atlassian.oauth.serviceprovider.ServiceProviderConsumerStore consumerStore, com.atlassian.event.api.EventPublisher eventPublisher, JiraPropertySetFactory propertySetFactory, UserKeyService userKeyService)
           
OfBizServiceProviderTokenStore(OfBizDelegator delegator, UserUtil userUtil, com.atlassian.oauth.serviceprovider.ServiceProviderConsumerStore consumerStore, JiraPropertySetFactory propertySetFactory, com.atlassian.event.api.EventPublisher eventPublisher, UserKeyService userKeyService, com.atlassian.oauth.serviceprovider.Clock clock)
           
 
Method Summary
 com.atlassian.oauth.serviceprovider.ServiceProviderToken get(String token)
           
 Iterable<com.atlassian.oauth.serviceprovider.ServiceProviderToken> getAccessTokensForUser(String username)
           
 com.atlassian.oauth.serviceprovider.ServiceProviderToken put(com.atlassian.oauth.serviceprovider.ServiceProviderToken token)
           
protected  com.atlassian.oauth.serviceprovider.ServiceProviderToken remove(String token)
           
 void removeAndNotify(String token)
           
 void removeByConsumer(String consumerKey)
           
protected  void removeByIds(List<Long> idsToRemove)
           
protected  void removeExpiredSessions()
           
 void removeExpiredSessionsAndNotify()
           
protected  List<com.atlassian.oauth.serviceprovider.ServiceProviderToken> removeExpiredTokens()
           
 void removeExpiredTokensAndNotify()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TABLE

public static final String TABLE
See Also:
Constant Field Values

PROPERTY_SET_KEY

public static final String PROPERTY_SET_KEY
See Also:
Constant Field Values
Constructor Detail

OfBizServiceProviderTokenStore

public OfBizServiceProviderTokenStore(OfBizDelegator delegator,
                                      UserUtil userUtil,
                                      com.atlassian.oauth.serviceprovider.ServiceProviderConsumerStore consumerStore,
                                      com.atlassian.event.api.EventPublisher eventPublisher,
                                      JiraPropertySetFactory propertySetFactory,
                                      UserKeyService userKeyService)

OfBizServiceProviderTokenStore

public OfBizServiceProviderTokenStore(OfBizDelegator delegator,
                                      UserUtil userUtil,
                                      com.atlassian.oauth.serviceprovider.ServiceProviderConsumerStore consumerStore,
                                      JiraPropertySetFactory propertySetFactory,
                                      com.atlassian.event.api.EventPublisher eventPublisher,
                                      UserKeyService userKeyService,
                                      com.atlassian.oauth.serviceprovider.Clock clock)
Method Detail

get

public com.atlassian.oauth.serviceprovider.ServiceProviderToken get(String token)
                                                             throws com.atlassian.oauth.serviceprovider.StoreException
Specified by:
get in interface com.atlassian.oauth.serviceprovider.ServiceProviderTokenStore
Throws:
com.atlassian.oauth.serviceprovider.StoreException

getAccessTokensForUser

public Iterable<com.atlassian.oauth.serviceprovider.ServiceProviderToken> getAccessTokensForUser(String username)
Specified by:
getAccessTokensForUser in interface com.atlassian.oauth.serviceprovider.ServiceProviderTokenStore

put

public com.atlassian.oauth.serviceprovider.ServiceProviderToken put(com.atlassian.oauth.serviceprovider.ServiceProviderToken token)
                                                             throws com.atlassian.oauth.serviceprovider.StoreException
Specified by:
put in interface com.atlassian.oauth.serviceprovider.ServiceProviderTokenStore
Throws:
com.atlassian.oauth.serviceprovider.StoreException

removeAndNotify

public void removeAndNotify(String token)
                     throws com.atlassian.oauth.serviceprovider.StoreException
Specified by:
removeAndNotify in interface com.atlassian.oauth.serviceprovider.ServiceProviderTokenStore
Throws:
com.atlassian.oauth.serviceprovider.StoreException

remove

@Nullable
protected final com.atlassian.oauth.serviceprovider.ServiceProviderToken remove(String token)
                                                                         throws com.atlassian.oauth.serviceprovider.StoreException
Throws:
com.atlassian.oauth.serviceprovider.StoreException

removeExpiredTokensAndNotify

public void removeExpiredTokensAndNotify()
                                  throws com.atlassian.oauth.serviceprovider.StoreException
Specified by:
removeExpiredTokensAndNotify in interface com.atlassian.oauth.serviceprovider.ServiceProviderTokenStore
Throws:
com.atlassian.oauth.serviceprovider.StoreException

removeExpiredTokens

protected final List<com.atlassian.oauth.serviceprovider.ServiceProviderToken> removeExpiredTokens()
                                                                                            throws com.atlassian.oauth.serviceprovider.StoreException
Throws:
com.atlassian.oauth.serviceprovider.StoreException

removeExpiredSessionsAndNotify

public void removeExpiredSessionsAndNotify()
                                    throws com.atlassian.oauth.serviceprovider.StoreException
Specified by:
removeExpiredSessionsAndNotify in interface com.atlassian.oauth.serviceprovider.ServiceProviderTokenStore
Throws:
com.atlassian.oauth.serviceprovider.StoreException

removeExpiredSessions

protected final void removeExpiredSessions()
                                    throws com.atlassian.oauth.serviceprovider.StoreException
Throws:
com.atlassian.oauth.serviceprovider.StoreException

removeByConsumer

public void removeByConsumer(String consumerKey)
Specified by:
removeByConsumer in interface com.atlassian.oauth.serviceprovider.ServiceProviderTokenStore

removeByIds

protected void removeByIds(List<Long> idsToRemove)


Copyright © 2002-2014 Atlassian. All Rights Reserved.