public class PCUser
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Class and Description |
---|---|
static class |
PCUser.ActivationState
Current user state:
NOT_INITIALIZED - not initialized NOT_ACTIVATED - activation code required ACTIVATED - active |
static class |
PCUser.ExtendedAuthMethods
Extended authentication method
|
static class |
PCUser.PCCodeType
Code type to calculate
|
Constructor and Description |
---|
PCUser() |
Modifier and Type | Method and Description |
---|---|
int |
getApiVersion()
Returns level of API which is used to interact with PC Server
|
int |
getCodeExpirationInterval(PCUser.PCCodeType code_type)
Get generated signatures and codes expiration interval
By default - 180 seconds |
java.util.Date |
getExpirationDate()
Get user's expiration date
|
PCUser.ExtendedAuthMethods[] |
getExtAuthAvailableMethods()
Get Extended authentication methods list for the User
|
java.lang.String |
getName()
Get User's Name used to store in device storage
|
int |
getPasswordPolicy()
Get password policy identifier
0 - User's keys can be stored without action from User (Application can generate store password by itself). |
java.lang.String |
getPCExternalUrl()
Get PCSDK External Server URL
|
byte[] |
getPublicKey()
Get User's public key in ASN.1 format
|
java.lang.String |
getRegisteredPushToken()
Get push token registered on PCSDK Server
|
java.lang.String |
getStorageId()
Get User's ID in PCSDK storage on the device
|
java.lang.String |
getSuggestedUserName()
Get User's Name suggested by the system
|
java.lang.String |
getSystemId()
Get PCSDK System ID
|
java.lang.String |
getSystemName()
Get PCSDK System Name
|
java.lang.String |
getUserId()
Get User ID in PCSDK service
|
boolean |
hasAutoSignKeyPair()
Check if user has generated key pair
|
boolean |
hasKeyPair()
Check if user has generated key pair
|
boolean |
isActivated()
Check if User is activated
|
boolean |
isAutosignEnabled()
Flag which indicates if the key can be used to sign transactions automatically
|
boolean |
isCollectDeviceInfo()
Check if collecting device information is required
|
boolean |
isCollectEvents()
Check if collecting device events during network interaction is required
|
boolean |
isCollectLocation()
Check if collecting location is required
Application should check this flag and, if it set, ask additional privileges ACCESS_FINE_LOCATION or ACCESS_COARSE_LOCATION |
boolean |
isCollectSIMInfo()
Check if collecting SIM information is required
Application should check this flag and, if it set, ask additional privileges READ_PHONE_STATE |
boolean |
isDenyRenewPubKey()
Check if renew public key is forbidden by PCSDK Server
If this flag is true, then PCSDK Server will accept only the first Public Key for the user Following requests to set Public Key will be rejected |
boolean |
isDenyStoreWithOSProtection()
Check if OS protection (like Google Fingerprint) for User's keys is forbidden
If flag is set then Application MUST NOT allow to use TouchID/FaceID/Google Fingerprint to store User's keys |
boolean |
isReadyToSign()
Check if User's keys are ready to sign (password submitted / user is activated)
|
boolean |
isRemoteUpdateEnabled()
Flag which indicates at possibility of remote updates (primarily used for backups)
|
boolean |
isScoringEnabled()
Flag indicates if the device scoring can be performed for the key
|
boolean |
isWithFingerPrint()
Check if use device fingerprinting required (link signatures to device unique properties)
|
int |
reset()
Reset user's state
|
void |
setCodeExpirationInterval(PCUser.PCCodeType code_type,
int interval)
Set generated signatures and codes expiration interval
By default - 180 seconds |
java.lang.String |
toString() |
public boolean hasKeyPair()
public boolean hasAutoSignKeyPair()
public int reset()
PCError
public java.util.Date getExpirationDate()
public java.lang.String getUserId()
public java.lang.String getName()
public java.lang.String getSuggestedUserName()
public java.lang.String getSystemId()
public java.lang.String getSystemName()
public PCUser.ExtendedAuthMethods[] getExtAuthAvailableMethods()
PCUser.ExtendedAuthMethods
public int getCodeExpirationInterval(PCUser.PCCodeType code_type)
code_type
- code typepublic void setCodeExpirationInterval(PCUser.PCCodeType code_type, int interval)
code_type
- code typeinterval
- new intervalpublic java.lang.String getPCExternalUrl()
public java.lang.String getStorageId()
public int getApiVersion()
public boolean isActivated()
public boolean isReadyToSign()
public byte[] getPublicKey()
public java.lang.String getRegisteredPushToken()
public boolean isWithFingerPrint()
public boolean isDenyRenewPubKey()
public boolean isCollectEvents()
public boolean isCollectDeviceInfo()
public boolean isCollectSIMInfo()
public boolean isCollectLocation()
public int getPasswordPolicy()
public boolean isDenyStoreWithOSProtection()
public boolean isScoringEnabled()
public boolean isAutosignEnabled()
public boolean isRemoteUpdateEnabled()
public java.lang.String toString()
toString
in class java.lang.Object