Package net.gini.android.authorization
Class SharedPreferencesCredentialsStore
- java.lang.Object
-
- net.gini.android.authorization.SharedPreferencesCredentialsStore
-
- All Implemented Interfaces:
CredentialsStore
public class SharedPreferencesCredentialsStore extends java.lang.Object implements CredentialsStore
-
-
Constructor Summary
Constructors Constructor Description SharedPreferencesCredentialsStore(android.content.SharedPreferences mSharedPreferences)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleandeleteUserCredentials()Deletes the stored user credentials.UserCredentialsgetUserCredentials()Returns the stored user credentials.booleanstoreUserCredentials(UserCredentials userCredentials)Store the given user credentials.
-
-
-
Method Detail
-
storeUserCredentials
public boolean storeUserCredentials(UserCredentials userCredentials)
Description copied from interface:CredentialsStoreStore the given user credentials. Warning: This method overwrites existing user credentials.- Specified by:
storeUserCredentialsin interfaceCredentialsStore- Parameters:
userCredentials- The user's credentials.- Returns:
- Whether the storing of the credentials was successful.
-
getUserCredentials
public UserCredentials getUserCredentials()
Description copied from interface:CredentialsStoreReturns the stored user credentials. Warning: If there are no stored user credentials, this method returns null.- Specified by:
getUserCredentialsin interfaceCredentialsStore- Returns:
- The stored user credentials.
-
deleteUserCredentials
public boolean deleteUserCredentials()
Description copied from interface:CredentialsStoreDeletes the stored user credentials.- Specified by:
deleteUserCredentialsin interfaceCredentialsStore- Returns:
- Whether the deleting of the credentials was successful.
-
-