Package org.cyclos.entities.access
Class Pin
- java.lang.Object
-
- org.cyclos.entities.SimpleEntity
-
- org.cyclos.entities.NetworkedEntity
-
- org.cyclos.entities.BaseEntity
-
- org.cyclos.entities.NamedEntity
-
- org.cyclos.entities.access.Pin
-
- All Implemented Interfaces:
Cloneable,Comparable<NamedEntity>,HasNetwork,ProcessableForProxying,DelegatingMutableUserPrincipal,DelegatingUserPrincipal,UserPrincipal,IEntity,INamedEntity
@Entity public class Pin extends NamedEntity implements DelegatingMutableUserPrincipal
This class represents user pins that can be used on a device (mainly the mobile app). Also known as Device PINs This will avoid the hardness of entering complex passwords by just entering a simple pin. The pin's value + a random SALT (32 chars long) will be stored hashed (BCrypt) and a random principal will be stored plain.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.cyclos.entities.SimpleEntity
SimpleEntity.EntityLoadNotifier
-
-
Constructor Summary
Constructors Constructor Description Pin()
-
Method Summary
-
Methods inherited from class org.cyclos.entities.NamedEntity
compareTo, getName, getNames, setName, toShortString, toString
-
Methods inherited from class org.cyclos.entities.BaseEntity
getDataTranslationType, getVersion
-
Methods inherited from class org.cyclos.entities.NetworkedEntity
isGlobal
-
Methods inherited from class org.cyclos.entities.SimpleEntity
equals, getId, hashCode, id, ids, isPersistent, isTransient, register, setId, uniqueIds, uniqueIds
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.cyclos.entities.users.DelegatingMutableUserPrincipal
initFrom
-
Methods inherited from interface org.cyclos.entities.users.DelegatingUserPrincipal
getDelegate, getPrincipal
-
Methods inherited from interface org.cyclos.entities.ProcessableForProxying
getProxyClass
-
-
-
-
Method Detail
-
getAccessClient
public AccessClient getAccessClient()
- Specified by:
getAccessClientin interfaceUserPrincipal
-
getAccountType
public UserAccountType getAccountType()
- Specified by:
getAccountTypein interfaceUserPrincipal
-
getBasicUser
public BasicUser getBasicUser()
- Specified by:
getBasicUserin interfaceUserPrincipal
-
getChannel
public Channel getChannel()
-
getCustomFieldValue
public UserCustomFieldValue getCustomFieldValue()
- Specified by:
getCustomFieldValuein interfaceUserPrincipal
-
getDate
public Date getDate()
-
getMobilePhone
public MobilePhone getMobilePhone()
- Specified by:
getMobilePhonein interfaceUserPrincipal
-
getNetwork
public Network getNetwork()
Description copied from interface:HasNetworkReturns the network this entity belongs to- Specified by:
getNetworkin interfaceHasNetwork
-
getPasswordType
public PasswordType getPasswordType()
-
getPinPrincipal
public String getPinPrincipal()
WARNING: This method returns the generated principal associated with the PIN. To get the principal associated with theUserPrincipal, useDelegatingUserPrincipal.getPrincipal().
-
getPrincipalType
public PrincipalType getPrincipalType()
- Specified by:
getPrincipalTypein interfaceUserPrincipal
-
getToken
public Token getToken()
- Specified by:
getTokenin interfaceUserPrincipal
-
getTrustedDevice
public TrustedDevice getTrustedDevice()
- Specified by:
getTrustedDevicein interfaceUserPrincipal
-
getUser
public BasicUser getUser()
-
getUserCustomFieldvalue
public UserCustomFieldValue getUserCustomFieldvalue()
-
getValue
public String getValue()
-
setAccessClient
public void setAccessClient(AccessClient accessClient)
- Specified by:
setAccessClientin interfaceDelegatingMutableUserPrincipal
-
setAccountType
public void setAccountType(UserAccountType accountType)
- Specified by:
setAccountTypein interfaceDelegatingMutableUserPrincipal
-
setBasicUser
public void setBasicUser(BasicUser basicUser)
- Specified by:
setBasicUserin interfaceDelegatingMutableUserPrincipal
-
setChannel
public void setChannel(Channel channel)
-
setCustomFieldValue
public void setCustomFieldValue(UserCustomFieldValue customFieldValue)
- Specified by:
setCustomFieldValuein interfaceDelegatingMutableUserPrincipal
-
setDate
public void setDate(Date date)
-
setMobilePhone
public void setMobilePhone(MobilePhone mobilePhone)
- Specified by:
setMobilePhonein interfaceDelegatingMutableUserPrincipal
-
setPasswordType
public void setPasswordType(PasswordType passwordType)
-
setPinPrincipal
public void setPinPrincipal(String pinPrincipal)
-
setPrincipalType
public void setPrincipalType(PrincipalType principalType)
- Specified by:
setPrincipalTypein interfaceDelegatingMutableUserPrincipal
-
setToken
public void setToken(Token token)
- Specified by:
setTokenin interfaceDelegatingMutableUserPrincipal
-
setTrustedDevice
public void setTrustedDevice(TrustedDevice trustedDevice)
- Specified by:
setTrustedDevicein interfaceDelegatingMutableUserPrincipal
-
setUser
public void setUser(BasicUser user)
-
setUserCustomFieldvalue
public void setUserCustomFieldvalue(UserCustomFieldValue userCustomFieldvalue)
-
setValue
public void setValue(String value)
-
-