Class SharedPreferencesCredentialPersistence

    • Constructor Detail

      • SharedPreferencesCredentialPersistence

        public SharedPreferencesCredentialPersistence​(android.content.Context context)
        Creates an instance of a SharedPreferencesCredentialPersistence based on SharedPreferences.
        Parameters:
        context - the application's context
        Throws:
        java.lang.IllegalArgumentException - if context is null
        Since:
        100.9.0
    • Method Detail

      • add

        public void add​(CredentialCacheEntry entry)
        Description copied from interface: CredentialPersistence
        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.
        Specified by:
        add in interface CredentialPersistence
        Parameters:
        entry - the entry to store
      • remove

        public void remove​(java.lang.String serverContext)
        Description copied from interface: CredentialPersistence
        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.
        Specified by:
        remove in interface CredentialPersistence
        Parameters:
        serverContext - the serverContext that matches the entry to remove.
      • update

        public void update​(CredentialCacheEntry entry)
        Description copied from interface: CredentialPersistence
        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.
        Specified by:
        update in interface CredentialPersistence
        Parameters:
        entry - the entry to update