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 boolean
deleteUserCredentials()
Deletes the stored user credentials.UserCredentials
getUserCredentials()
Returns the stored user credentials.boolean
storeUserCredentials(UserCredentials userCredentials)
Store the given user credentials.
-
-
-
Method Detail
-
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.
-
-