Class ActiveObjectsServiceProviderTokenStore

  • All Implemented Interfaces:
    com.atlassian.oauth.serviceprovider.ServiceProviderTokenStore

    public class ActiveObjectsServiceProviderTokenStore
    extends Object
    implements com.atlassian.oauth.serviceprovider.ServiceProviderTokenStore
    Provides an implementation of the OAuth Service Provider token store. That is OAuth tokens that are used to process incoming requests.
    • Constructor Detail

      • ActiveObjectsServiceProviderTokenStore

        @Inject
        public ActiveObjectsServiceProviderTokenStore​(SchemaNameSupplier schemaProvider)
    • 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
      • 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
      • getExpiredTokens

        protected final Stream<com.atlassian.oauth.serviceprovider.ServiceProviderToken> getExpiredTokens()
                                                                                                   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