com.atlassian.jira.oauth.serviceprovider
Class CachingServiceProviderTokenStore

java.lang.Object
  extended by com.atlassian.jira.oauth.serviceprovider.CachingServiceProviderTokenStore
All Implemented Interfaces:
com.atlassian.oauth.serviceprovider.ServiceProviderTokenStore, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean

public class CachingServiceProviderTokenStore
extends Object
implements com.atlassian.oauth.serviceprovider.ServiceProviderTokenStore, org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean

Caching Service provider token store, responsible for caching OAuth service provider authentication tokens.

Since:
v4.0

Constructor Summary
CachingServiceProviderTokenStore(com.atlassian.oauth.serviceprovider.ServiceProviderTokenStore delegateStore, com.atlassian.event.api.EventPublisher eventPublisher, com.atlassian.cache.CacheManager cacheManager)
           
 
Method Summary
 void afterPropertiesSet()
           
 void clearCaches(ClearCacheEvent event)
           
 void destroy()
           
 com.atlassian.oauth.serviceprovider.ServiceProviderToken get(String token)
           
 Iterable<com.atlassian.oauth.serviceprovider.ServiceProviderToken> getAccessTokensForUser(String username)
           
 void onUserRenamed(UserRenamedEvent event)
           
 com.atlassian.oauth.serviceprovider.ServiceProviderToken put(com.atlassian.oauth.serviceprovider.ServiceProviderToken token)
           
 void removeAndNotify(String token)
           
 void removeByConsumer(String consumerKey)
           
 void removeExpiredSessionsAndNotify()
           
 void removeExpiredTokensAndNotify()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CachingServiceProviderTokenStore

public CachingServiceProviderTokenStore(com.atlassian.oauth.serviceprovider.ServiceProviderTokenStore delegateStore,
                                        com.atlassian.event.api.EventPublisher eventPublisher,
                                        com.atlassian.cache.CacheManager cacheManager)
Method Detail

destroy

public void destroy()
             throws Exception
Specified by:
destroy in interface org.springframework.beans.factory.DisposableBean
Throws:
Exception

afterPropertiesSet

public void afterPropertiesSet()
                        throws Exception
Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
Throws:
Exception

clearCaches

@EventListener
public void clearCaches(ClearCacheEvent event)

onUserRenamed

@EventListener
public void onUserRenamed(UserRenamedEvent event)

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

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

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
Since:
5.1

removeByConsumer

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


Copyright © 2002-2014 Atlassian. All Rights Reserved.