Class DeviceUser
-
- All Implemented Interfaces:
@Serializable() public final class DeviceUserRepresents the model of a device user.
- Since:
3.3
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classDeviceUser.Companion
-
Field Summary
Fields Modifier and Type Field Description private final Useruserprivate final Booleancurrentprivate final BooleanonBoardedprivate final LongcreationTimeprivate final LongupdateTimeprivate final Stringidprivate final Stringnameprivate final Stringemailprivate final StringsecureStoreNameprivate final StringfamilyNameprivate final StringgivenNameprivate final StringsecureStoreName2public final static DeviceUser.CompanionCompanion
-
Constructor Summary
Constructors Constructor Description DeviceUser(User user, Boolean current, Boolean onBoarded, Long creationTime, Long updateTime)
-
Method Summary
Modifier and Type Method Description final UsergetUser()final BooleangetCurrent()Whether a user is the current active user or not. final BooleangetOnBoarded()Whether a user went through the complete onboarding process and ready to unlock the app with the passcode. final LonggetCreationTime()The creation time of this user. final LonggetUpdateTime()The latest update time. final StringgetId()The user id, it's the same as the user model saved at server side. final StringgetName()If name property returned from server, then 'name' would be 'family name, first name', otherwise 'userName'. final StringgetEmail()The email address, it might be empty. final StringgetSecureStoreName()The secure store name of this user. final StringgetFamilyName()final StringgetGivenName()final StringgetSecureStoreName2()The secure store name with the one way hash algorithm. StringtoString()final static StringobfuscateEmail(String str)The default algorithm to obfuscate email, only keep the first one or two characters of the user name and only the first character of the domain name. final static StringobfuscateName(String name)The default algorithm to obfuscate user name, only keep the first one or 2 characters. -
-
Constructor Detail
-
DeviceUser
DeviceUser(User user, Boolean current, Boolean onBoarded, Long creationTime, Long updateTime)
-
-
Method Detail
-
getCurrent
final Boolean getCurrent()
Whether a user is the current active user or not.
-
getOnBoarded
final Boolean getOnBoarded()
Whether a user went through the complete onboarding process and ready to unlock the app with the passcode.
-
getCreationTime
final Long getCreationTime()
The creation time of this user.
-
getUpdateTime
final Long getUpdateTime()
The latest update time.
-
getId
final String getId()
The user id, it's the same as the user model saved at server side.
-
getName
final String getName()
If name property returned from server, then 'name' would be 'family name, first name', otherwise 'userName'.
-
getEmail
final String getEmail()
The email address, it might be empty.
-
getSecureStoreName
final String getSecureStoreName()
The secure store name of this user.
-
getFamilyName
final String getFamilyName()
-
getGivenName
final String getGivenName()
-
getSecureStoreName2
final String getSecureStoreName2()
The secure store name with the one way hash algorithm.
-
toString
String toString()
-
obfuscateEmail
final static String obfuscateEmail(String str)
The default algorithm to obfuscate email, only keep the first one or two characters of the user name and only the first character of the domain name.
-
obfuscateName
final static String obfuscateName(String name)
The default algorithm to obfuscate user name, only keep the first one or 2 characters.
-
-
-
-