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
|
Modifier and Type | Field and Description |
---|---|
static int |
PCUSER_TYPE_ECDSA |
static int |
PCUSER_TYPE_GOST |
Constructor and Description |
---|
PCUser() |
Modifier and Type | Method and Description |
---|---|
boolean |
areOnlineCredentialsRequired()
Flag which indicates that activation code and password are checked online when submitted
|
CryptoHelper.CryptographyOperationResult |
getActivationCodeForRenewal()
Calculates activation code for renewal.
|
int |
getActivationCodeLength()
Returns length of the digital activation code.
This value is provided for the informational purposes and indicates the length of the digital activation code that must be submitted to PCUsersManager.activate(PCUser, String, PCActivateCallback) for the PCUser with
isActivated() == false.This value is available for PCUser that works with API version 7+ ( getApiVersion() >= 7 == true).This value is not saved into the storage. |
int |
getApiVersion()
Returns level of API which is used to interact with PC Server
|
java.lang.String |
getAppExtra()
Get additional data
|
int |
getCodeExpirationInterval(PCUser.PCCodeType code_type)
Get generated signatures and codes expiration interval
By default - 180 seconds |
byte[] |
getEncryptedAutoSignPrivateKey() |
java.util.Date |
getExpirationDate()
Get user's expiration date
|
PCUser.ExtendedAuthMethods[] |
getExtAuthAvailableMethods()
Get Extended authentication methods list for the User
|
java.lang.String |
getExternalKeyAlias()
In case the asymmetric key pair is generated on the external device (i.e.
|
int |
getKeyIndex()
Returns index of the symmetric key.
|
int |
getKeysProcessorPolicy()
Returns keys processing policy for current user.
0 - No external keys processor allowed (key pair must be generated and stored on a device) 1 - Key pair can be generated and stored either on a smartphone or external device (like a smart-card) 2 - Some external keys processor must be used (key pair cannot be generated and stored on a smartphone) Application MUST check policy and store user's key with required method |
int |
getKeyVersion() |
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
|
PCPushServiceType |
getRegisteredPushServiceType()
Type of push token registered on PC Server
|
java.lang.String |
getRegisteredPushToken()
Get push token registered on PC 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
|
int |
getType()
Type of the user.
|
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 static final int PCUSER_TYPE_ECDSA
public static final int PCUSER_TYPE_GOST
public byte[] getEncryptedAutoSignPrivateKey()
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 int getKeyIndex()
public boolean isActivated()
public int getKeyVersion()
public int getType()
getKeyVersion()
== 6getKeyVersion()
== 6)
1 for keys using GOST ciphering/signature algorithms (starting getKeyVersion()
== 6)public boolean isReadyToSign()
public byte[] getPublicKey()
public java.lang.String getRegisteredPushToken()
public PCPushServiceType getRegisteredPushServiceType()
public java.lang.String getExternalKeyAlias()
PCKeysProcessor
than PCRegularKeysProcessor
is used), the external
device should use this unique alias to link the key pair with PCUserpublic boolean isWithFingerPrint()
public boolean isDenyRenewPubKey()
public boolean isCollectEvents()
public boolean isCollectDeviceInfo()
public boolean isCollectSIMInfo()
public boolean isCollectLocation()
public int getPasswordPolicy()
public int getKeysProcessorPolicy()
public java.lang.String getAppExtra()
public boolean isDenyStoreWithOSProtection()
public boolean isScoringEnabled()
public boolean isAutosignEnabled()
public boolean isRemoteUpdateEnabled()
public boolean areOnlineCredentialsRequired()
public CryptoHelper.CryptographyOperationResult getActivationCodeForRenewal()
isReadyToSign()
== true.
Normally, the application does not consume this method. It is rather useful for libraries which implement
PCKeysProcessor
.public int getActivationCodeLength()
PCUsersManager.activate(PCUser, String, PCActivateCallback)
for the PCUser with
isActivated()
== false.getApiVersion()
>= 7 == true).PCUsersManager.importUser(String)
,
but not available for objects returned by PCUsersManager.listStorage()
.public java.lang.String toString()
toString
in class java.lang.Object