-
@RestrictTo(value = Scope.LIBRARY) public class LoginInfoProvider
Handles saving and/or providing login related information.
-
-
Constructor Summary
Constructors Constructor Description LoginInfoProvider(Context context, CleverTapInstanceConfig config, CryptHandler cryptHandler)LoginInfoProvider(Context context, CleverTapInstanceConfig config)
-
Method Summary
Modifier and Type Method Description voidcacheGUIDForIdentifier(String guid, String key, String identifier)Caches a single pair of for this account and updates the length of the cgk map voidremoveValueFromCachedGUIDForIdentifier(String guid, String key)Removes value for PII(Email) pair of for this account from shared prefs and updates the length of the cgk map booleandeviceIsMultiUser()JSONObjectgetDecryptedCachedGUIDs()voidsetCachedGUIDsAndLength(String cachedGUIDs, int cgkLength)Caches or removes the pairs for this account voidremoveCachedGuidFromSharedPrefs()StringgetCachedIdentityKeysForAccount()StringgetGUIDForIdentifier(String key, String identifier)Returns the Guid Value corresponding to the given If guid is not found, then it returns null booleanisAnonymousDevice()booleanisLegacyProfileLoggedIn()Checks if any user was previously logged in using the legacy identity setfor theaccount. voidsaveIdentityKeysForAccount(String valueCommaSeparated)Saves cached identity keys in the preference -
-
Constructor Detail
-
LoginInfoProvider
LoginInfoProvider(Context context, CleverTapInstanceConfig config, CryptHandler cryptHandler)
-
LoginInfoProvider
LoginInfoProvider(Context context, CleverTapInstanceConfig config)
-
-
Method Detail
-
cacheGUIDForIdentifier
void cacheGUIDForIdentifier(String guid, String key, String identifier)
Caches a single pair of for this account and updates the length of the cgk map
- Parameters:
guid- - guid of the userkey- - Identity Key e.identifier- - Value corresponding to the Key e.g abc@gmail.comFormat in which the entries are saved"Email_abc@gmail.
-
removeValueFromCachedGUIDForIdentifier
void removeValueFromCachedGUIDForIdentifier(String guid, String key)
Removes value for PII(Email) pair of for this account from shared prefs and updates the length of the cgk map
- Parameters:
guid- - guid of the userkey- - Identity Key e.
-
deviceIsMultiUser
boolean deviceIsMultiUser()
-
getDecryptedCachedGUIDs
JSONObject getDecryptedCachedGUIDs()
-
setCachedGUIDsAndLength
void setCachedGUIDsAndLength(String cachedGUIDs, int cgkLength)
Caches or removes the pairs for this account
- Parameters:
cachedGUIDs- - jsonObject of the PairscgkLength- - length of the JSONObject
-
removeCachedGuidFromSharedPrefs
void removeCachedGuidFromSharedPrefs()
-
getCachedIdentityKeysForAccount
String getCachedIdentityKeysForAccount()
-
getGUIDForIdentifier
String getGUIDForIdentifier(String key, String identifier)
Returns the Guid Value corresponding to the given If guid is not found, then it returns null
- Parameters:
key- - Identity Key e.identifier- - Value corresponding to the Key e.g abc@gmail.
-
isAnonymousDevice
boolean isAnonymousDevice()
-
isLegacyProfileLoggedIn
boolean isLegacyProfileLoggedIn()
Checks if any user was previously logged in using the legacy identity setfor theaccount.
-
saveIdentityKeysForAccount
void saveIdentityKeysForAccount(String valueCommaSeparated)
Saves cached identity keys in the preference
- Parameters:
valueCommaSeparated- - identity keys in comma separated format e.g.
-
-
-
-