Reference doc - mAccess library (Java)
This is a reference documentation of the TrustBuilder MFA mAccess library in Java. It lists error codes and methods integrated in the library.
Download mAccess library
The last version of TrustBuilder MFA mAccess library is available on the Resources Downloads page.
Go over the implementation guide to know how to integrate the TrustBuilder MFA SDK to your Android application.
Error codes
Code | Value | Description |
---|---|---|
ERR_OK | 0 | no error |
ERR_NETWORK | 1 | network or server unreachable |
ERR_CODE | 2 | The Activation code is incorrect |
ERR_SN | 3 | one argument does not have the right syntax |
ERR_ACCESS | 4 | access refused |
ERR_VERSION | 5 | version error |
ERR_BLOCKED | 7 | account is blocked |
ERR_STATE | 8 | internal state not correct |
ERR_NODEVICE | 9 | device is disabled or unknown |
ERR_NOCA | 10 | User must activate helium or Desktop Token before achieving this operation |
ERR_NOSRV | 11 | No service is available |
ERR_PINREUSED | 12 | the new password equals the previous one |
ERR_SYNCHROFAILED | 13 | the operation succeeded but it required a post-synchronization which failed |
ERR_FORBIDDEN | 14 | forbidden operation (due to activated state/blocked state/upgradable state) |
ERR_PINREFUSED | 15 | the password is refused (bad format) |
ERR_TIMEOUT | 16 | timeout expired between xxxStart and xxxFinalize |
ERR_BIOKEY | 26 | device is locked due to biokey errors |
DESYNCHRONIZED | 27 | device desynchronized |
ERR_OTHER | 999 | any other error |
Pin Mode codes
Code | Value | Description |
---|---|---|
PINMODE_NONE | 0 | no pin is required (leave “”) |
PINMODE_CURRENT | 1 | current pin is required |
PINMODE_NEW | 2 | a new pin is required |
PINMODE_BIO | 8 | a biokey is required |
PINMODE_CURRENT | PINMODE_BIO | 9 | a pin OR biokey is required |
Methods
The methods below are included in the class IW of the package com.inwebo.iwlib, in the mAccess library.
Activation
ActivationStart |
---|
CODE
Method description: starts the device activation process. Parameters:
Returns: an error code:
|
ActivationFinalize |
---|
CODE
Method description: finalizes the device activation process Parameters:
Returns: an error code
|
Unlock - Reset PIN
ResetStart |
---|
CODE
Method description: starts the reset pin process Parameters:
Returns: an error code
|
ResetFinalize |
---|
CODE
Method description: finalizes the reset pin process Parameters:
Returns: an error code
|
Synchronization
SynchronizeStart |
---|
CODE
Method description: starts the synchronization process to synchronize information between the application and TrustBuilderserver. Returns: an error code |
SynchronizeFinalize |
---|
CODE
Method description: finalizes the synchronization process to synchronize information between the application and TrustBuilder server. Parameters:
Returns: an error code |
PIN update
PwdUpdateStart |
---|
CODE
Method description: starts the pin update process Returns: an error code
|
PwdUpdateFinalize |
---|
CODE
Method description: finalizes the pin update process Parameters:
Returns: an error code
|
Reset all Biometric keys
UnsetBiokeysStart |
---|
CODE
Method description: starts the process of resetting all biometric keys. Returns: an error code
A call to IWPinMode () will indicate which kind of password is required (current or none) |
UnsetBiokeysFinalize |
---|
CODE
Method description: finalize the process of resetting all biometric keys. Parameters:
Returns: an error code
|
Register Biometric key
SetBiokeyStart |
---|
CODE
Method description: starts the biometrics registration process Returns: an error code
|
SetBiokeyFinalize |
---|
CODE
Method description: finalizes the biometrics registration process Parameters:
Returns: an error code
|
Online OTP
OnlineOtpStart |
---|
CODE
Method description: starts the “online OTP generation” process Parameters:
Returns: an error code
|
OnlineOtpFinalize |
---|
CODE
Method description: finalizes the “online OTP generation” process Parameters:
Returns:
|
OtpAnswerOtp |
---|
CODE
Method description: retrieves a generated OTP after a process of online OTP generation (only if the Returns: an OTP |
OnlineOtpFinalizeExt |
---|
CODE
Method description: finalizes the “online OTP generation” process with biometric key or pin code. Parameters:
Returns: an error code
|
Offline OTP
OtpShouldSynchronize |
---|
CODE
Method description: checks if a synchronization process is required, before starting the process of Offline OTP generation Parameters:
Returns: an error code
|
OtpModeQuery |
---|
CODE
Method description: indicates whether the pin should be requested, after a Parameters:
Returns: an error code
|
OtpGenerate |
---|
CODE
Method description: retrieves a generated OTP after a process of offline OTP generation (only if the Parameters:
Returns: an OTP |
DisplayTime |
---|
CODE
Method description: displays the remaining time before the OTP expiration (in seconds) Returns: |
Push Notifications
SetDeviceOS |
---|
CODE
Method description: defines the device operating system. Parameters:
Deprecated versions
|
PushRegistrationStart |
---|
CODE
Method description: starts the push registration process to allow TrustBuilder to send push notifications to your application. Returns: an error code
|
PushRegistrationFinalize |
---|
CODE
Method description: finalizes the push registration process to allow TrustBuilder to send push notifications to your application. Parameters:
Returns: an error code
|
CheckPush |
---|
CODE
Method description: Checks if a push notification is available on TrustBuilder server for the active instance of mAccess, and retrieves it. Typically this function can be called when starting the application. Returns: an error code
|
PushAlias |
---|
CODE
Method description: Gets the push session id, or alias, related to the retrieved push (if a Returns: |
PushAction |
---|
CODE
Method description: gets the push action type of the push notification (authenticate or activate) Returns: |
PushContext |
---|
CODE
Method description: gets the push notification context information if there is one (authentication only) Returns: |
Sealing
OnlineSealStart |
---|
CODE
Method description: starts the “online seal generation” process Parameters:
Returns: an error code |
OnlineSealFinalize |
---|
CODE
Method description: finalizes the “online seal generation” process Parameters:
Returns: |
OnlineSealFinalizeExt |
---|
CODE
Method description: finalizes the “online seal generation” process with biometric key or PIN code Parameters:
Returns: an error code |
SealAnswerOtp |
---|
CODE
Method description: retrieves a generated OTP after a process of seal generation (only if the Returns: an OTP |
SealShouldSynchronize |
---|
CODE
Method description: indicates if synchronization should be proposed to the user, BEFORE offline sealing. (i.e. before calling IWSealModeQuery ()). A synchronization is required if more than 3 OTPs are generated in less than 2 minutes for the same service Parameters:
Returns:
|
SealModeQuery |
---|
CODE
Method description: initializes the Offline Seal process indicating whether the pin should be requested Parameters:
Returns: always returns 1 → pin is required |
SealGenerate |
---|
CODE
Method description: generates the seal Parameters:
Returns: the generated seal |
Initialization and configuration
Init |
---|
CODE
Method description: initializes the library Parameters:
|
VersionGet |
---|
CODE
Method description: gets the mAccess library version Returns: the library version number |
HostVersionSet |
---|
CODE
Method description: provides the host/application version number. Parameters:
|
WsTimeoutSet |
---|
CODE
Method description: defines the timeout value for the web service calls, in millisecond. Parameters:
|
WsServerSet |
---|
CODE
Method description: defines the server value for the web service calls Parameters:
|
LangSet |
---|
CODE
Method description: defines the application language. Parameters:
|
MaccessSet |
---|
CODE
Method description: provides the mAccess ID associated to its service Parameters:
|
Storage
StorageDataChanged |
---|
CODE
Method description: indicates whether the stored data has changed. When true, the host should call Returns:
|
StorageDataGet |
---|
CODE
Method description: gets the data to be stored locally. This string contains the internal state of mAccess (keys, service description …). The host should not try to process this string: it should only store it locally. Returns: The data to be stored (ASCII string) |
StorageDataSet |
---|
CODE
Method description: provides the stored data to the library. This should be done at the app initialization. Parameters:
|
Information
PinMode |
---|
CODE
Method description: indicates the pin mode that should be used for the current process Returns: pinmode
To know more, refer to “Pin Mode codes” table. |
MajorVersionRequired |
---|
CODE
Method description: indicates whether a major version update of the mAccess library is required. Returns:
|
NewVersionAvailable |
---|
CODE
Method description: indicates whether a new version of the mAccess library is available. Returns:
|
NewVersionURL |
---|
CODE
Method description: gets the URL new version Returns:
|
ShouldAskForMinorUpdate |
---|
CODE
Method description: indicates whether a minor version update should be proposed to the user. Returns: Returns 1 if a minor version update should be proposed to the user. After this function returns 1 once, it will always return 0. |
IsActivated |
---|
CODE
Method description: indicates whether the application integrating mAccess library is activated, whether the account is activated with mAccess or not. Returns:
|
MustUpgrade |
---|
CODE
Method description: indicates whether the application must upgrade first (the local data is from an old version). Returns:
|
IsBlocked |
---|
CODE
Method description: indicates whether the device is blocked. If yes, it has to be unlocked. Returns:
|
ServiceNb |
---|
CODE
Method description: indicates the number of services Returns: “1” which means that the application is linked to one service. |
ServiceName |
---|
CODE
Method description: indicates the name of the TrustBuilder service linked to the application Parameters:
Returns: the service name |
ServiceLogo |
---|
CODE
Method description: indicates the URL of the service PNG logo. Parameters:
Returns: URL of the service logo |
ServiceDisabled |
---|
CODE
Method description: indicates whether the service is disabled or not. Parameters:
Returns:
|