Package net.gini.android.authorization
Class EncryptedCredentialsStore
- java.lang.Object
-
- net.gini.android.authorization.EncryptedCredentialsStore
-
- All Implemented Interfaces:
CredentialsStore
public class EncryptedCredentialsStore extends java.lang.Object implements CredentialsStore
Created by Alpar Szotyori on 08.10.2018. Copyright (c) 2018 Gini GmbH.
-
-
Constructor Summary
Constructors Constructor Description EncryptedCredentialsStore(android.content.SharedPreferences sharedPreferences, android.content.Context context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
deleteUserCredentials()
Deletes the stored user credentials.void
encryptExistingPlaintextCredentials()
UserCredentials
getUserCredentials()
Returns the stored user credentials.boolean
storeUserCredentials(UserCredentials userCredentials)
Store the given user credentials.
-
-
-
Method Detail
-
encryptExistingPlaintextCredentials
public void encryptExistingPlaintextCredentials()
-
storeUserCredentials
public boolean storeUserCredentials(UserCredentials userCredentials)
Description copied from interface:CredentialsStore
Store the given user credentials. Warning: This method overwrites existing user credentials.- Specified by:
storeUserCredentials
in interfaceCredentialsStore
- Parameters:
userCredentials
- The user's credentials.- Returns:
- Whether the storing of the credentials was successful.
-
getUserCredentials
public UserCredentials getUserCredentials()
Description copied from interface:CredentialsStore
Returns the stored user credentials. Warning: If there are no stored user credentials, this method returns null.- Specified by:
getUserCredentials
in interfaceCredentialsStore
- Returns:
- The stored user credentials.
-
deleteUserCredentials
public boolean deleteUserCredentials()
Description copied from interface:CredentialsStore
Deletes the stored user credentials.- Specified by:
deleteUserCredentials
in interfaceCredentialsStore
- Returns:
- Whether the deleting of the credentials was successful.
-
-