Interface CredentialPersistence

    • Method Detail

      • add

        void add​(CredentialCacheEntry entry)
        This method will be called whenever a new Credential is added to the AuthenticationManager.CredentialCache. This will typically occur during an authentication challenge. You must not block this method while persisting the credential to storage, in other words, any file I/O operations should be done asynchronously so that this method can return immediately.
        Parameters:
        entry - the entry to store
        Since:
        100.9.0
      • clear

        void clear()
        This method will be called whenever all credentials are removed at once, such as with a call to AuthenticationManager.CredentialCache.removeAndRevokeAllCredentialsAsync(). You must not block this method while clearing persisted credentials, in other words, any file I/O operations should be done asynchronously so that this method can return immediately.
        Since:
        100.9.0
      • remove

        void remove​(String serverContext)
        This method will be called whenever a credential is removed from the AuthenticationManager.CredentialCache. You must not block this method while removing the persisted credential, in other words, any file I/O operations should be done asynchronously so that this method can return immediately.
        Parameters:
        serverContext - the serverContext that matches the entry to remove.
        Since:
        100.9.0
      • update

        void update​(CredentialCacheEntry entry)
        This method will be called whenever a credential in the credential cache is updated or completely replaced, for example when the access token of an OAuthTokenCredential in the credential cache is updated. You must not block this method while updating the persisted credential, in other words, any file I/O operations should be done asynchronously so that this method can return immediately.
        Parameters:
        entry - the entry to update
        Since:
        100.9.0