Class OAuth2TokenStore

  • All Implemented Interfaces:
    com.google.api.client.util.store.DataStore<com.google.api.client.auth.oauth2.StoredCredential>

    public class OAuth2TokenStore
    extends Object
    implements com.google.api.client.util.store.DataStore<com.google.api.client.auth.oauth2.StoredCredential>
    DataStore backed by a Nuxeo Directory
    Since:
    7.3
    • Constructor Detail

      • OAuth2TokenStore

        public OAuth2TokenStore​(String serviceName)
    • Method Detail

      • set

        public com.google.api.client.util.store.DataStore<com.google.api.client.auth.oauth2.StoredCredential> set​(String key,
                                                                                                                  com.google.api.client.auth.oauth2.StoredCredential credential)
                                                                                                           throws IOException
        Specified by:
        set in interface com.google.api.client.util.store.DataStore<com.google.api.client.auth.oauth2.StoredCredential>
        Throws:
        IOException
      • delete

        public com.google.api.client.util.store.DataStore<com.google.api.client.auth.oauth2.StoredCredential> delete​(String key)
                                                                                                              throws IOException
        Specified by:
        delete in interface com.google.api.client.util.store.DataStore<com.google.api.client.auth.oauth2.StoredCredential>
        Throws:
        IOException
      • get

        public com.google.api.client.auth.oauth2.StoredCredential get​(String key)
                                                               throws IOException
        Specified by:
        get in interface com.google.api.client.util.store.DataStore<com.google.api.client.auth.oauth2.StoredCredential>
        Throws:
        IOException
      • getDataStoreFactory

        public com.google.api.client.util.store.DataStoreFactory getDataStoreFactory()
        Specified by:
        getDataStoreFactory in interface com.google.api.client.util.store.DataStore<com.google.api.client.auth.oauth2.StoredCredential>
      • getId

        public final String getId()
        Specified by:
        getId in interface com.google.api.client.util.store.DataStore<com.google.api.client.auth.oauth2.StoredCredential>
      • containsKey

        public boolean containsKey​(String key)
                            throws IOException
        Specified by:
        containsKey in interface com.google.api.client.util.store.DataStore<com.google.api.client.auth.oauth2.StoredCredential>
        Throws:
        IOException
      • containsValue

        public boolean containsValue​(com.google.api.client.auth.oauth2.StoredCredential value)
                              throws IOException
        Specified by:
        containsValue in interface com.google.api.client.util.store.DataStore<com.google.api.client.auth.oauth2.StoredCredential>
        Throws:
        IOException
      • isEmpty

        public boolean isEmpty()
                        throws IOException
        Specified by:
        isEmpty in interface com.google.api.client.util.store.DataStore<com.google.api.client.auth.oauth2.StoredCredential>
        Throws:
        IOException
      • size

        public int size()
                 throws IOException
        Specified by:
        size in interface com.google.api.client.util.store.DataStore<com.google.api.client.auth.oauth2.StoredCredential>
        Throws:
        IOException
      • keySet

        public Set<String> keySet()
                           throws IOException
        Specified by:
        keySet in interface com.google.api.client.util.store.DataStore<com.google.api.client.auth.oauth2.StoredCredential>
        Throws:
        IOException
      • values

        public Collection<com.google.api.client.auth.oauth2.StoredCredential> values()
                                                                              throws IOException
        Specified by:
        values in interface com.google.api.client.util.store.DataStore<com.google.api.client.auth.oauth2.StoredCredential>
        Throws:
        IOException
      • clear

        public com.google.api.client.util.store.DataStore<com.google.api.client.auth.oauth2.StoredCredential> clear()
                                                                                                             throws IOException
        Specified by:
        clear in interface com.google.api.client.util.store.DataStore<com.google.api.client.auth.oauth2.StoredCredential>
        Throws:
        IOException
      • delete

        public void delete​(String token,
                           String clientId)
      • getToken

        public NuxeoOAuth2Token getToken​(String clientId,
                                         String userId)
        Retrieves an entry by its clientId and nuxeoLogin.
        Since:
        9.10