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
|
|---|
Method description: starts the device activation process. Parameters:
Returns: an error code:
|
ActivationFinalize
|
|---|
Method description: finalizes the device activation process Parameters:
Returns: an error code
|
Unlock - Reset PIN
ResetStart
|
|---|
Method description: starts the reset pin process Parameters:
Returns: an error code
|
ResetFinalize
|
|---|
Method description: finalizes the reset pin process Parameters:
Returns: an error code
|
Synchronization
SynchronizeStart
|
|---|
Method description: starts the synchronization process to synchronize information between the application and TrustBuilderserver. Returns: an error code |
SynchronizeFinalize
|
|---|
Method description: finalizes the synchronization process to synchronize information between the application and TrustBuilder server. Parameters:
Returns: an error code |
PIN update
PwdUpdateStart
|
|---|
Method description: starts the pin update process Returns: an error code
|
PwdUpdateFinalize
|
|---|
Method description: finalizes the pin update process Parameters:
Returns: an error code
|
Reset all Biometric keys
UnsetBiokeysStart
|
|---|
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
|
|---|
Method description: finalize the process of resetting all biometric keys. Parameters:
Returns: an error code
|
Register Biometric key
SetBiokeyStart
|
|---|
Method description: starts the biometrics registration process Returns: an error code
|
SetBiokeyFinalize
|
|---|
Method description: finalizes the biometrics registration process Parameters:
Returns: an error code
|
Online OTP
OnlineOtpStart
|
|---|
Method description: starts the “online OTP generation” process Parameters:
Returns: an error code
|
OnlineOtpFinalize
|
|---|
Method description: finalizes the “online OTP generation” process Parameters:
Returns:
|
OtpAnswerOtp
|
|---|
Method description: retrieves a generated OTP after a process of online OTP generation (only if the Returns: an OTP |
OnlineOtpFinalizeExt
|
|---|
Method description: finalizes the “online OTP generation” process with biometric key or pin code. Parameters:
Returns: an error code
|
Offline OTP
OtpShouldSynchronize
|
|---|
Method description: checks if a synchronization process is required, before starting the process of Offline OTP generation Parameters:
Returns: an error code
|
OtpModeQuery
|
|---|
Method description: indicates whether the pin should be requested, after a Parameters:
Returns: an error code
|
OtpGenerate
|
|---|
Method description: retrieves a generated OTP after a process of offline OTP generation (only if the Parameters:
Returns: an OTP |
DisplayTime
|
|---|
Method description: displays the remaining time before the OTP expiration (in seconds) Returns: |
Push Notifications
SetDeviceOS
|
|---|
Method description: defines the device operating system. Parameters:
Deprecated versions
|
PushRegistrationStart
|
|---|
Method description: starts the push registration process to allow TrustBuilder to send push notifications to your application. Returns: an error code
|
PushRegistrationFinalize
|
|---|
Method description: finalizes the push registration process to allow TrustBuilder to send push notifications to your application. Parameters:
Returns: an error code
|
CheckPush
|
|---|
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
|
|---|
Method description: Gets the push session id, or alias, related to the retrieved push (if a Returns: |
PushAction
|
|---|
Method description: gets the push action type of the push notification (authenticate or activate) Returns: |
PushContext
|
|---|
Method description: gets the push notification context information if there is one (authentication only) Returns: |
Sealing
OnlineSealStart
|
|---|
Method description: starts the “online seal generation” process Parameters:
Returns: an error code |
OnlineSealFinalize
|
|---|
Method description: finalizes the “online seal generation” process Parameters:
Returns: |
OnlineSealFinalizeExt
|
|---|
Method description: finalizes the “online seal generation” process with biometric key or PIN code Parameters:
Returns: an error code |
SealAnswerOtp
|
|---|
Method description: retrieves a generated OTP after a process of seal generation (only if the Returns: an OTP |
SealShouldSynchronize
|
|---|
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
|
|---|
Method description: initializes the Offline Seal process indicating whether the pin should be requested Parameters:
Returns: always returns 1 → pin is required |
SealGenerate
|
|---|
Method description: generates the seal Parameters:
Returns: the generated seal |
Initialization and configuration
Init
|
|---|
Method description: initializes the library Parameters:
|
VersionGet
|
|---|
Method description: gets the mAccess library version Returns: the library version number |
HostVersionSet
|
|---|
Method description: provides the host/application version number. Parameters:
|
WsTimeoutSet
|
|---|
Method description: defines the timeout value for the web service calls, in millisecond. Parameters:
|
WsServerSet
|
|---|
Method description: defines the server value for the web service calls Parameters:
|
LangSet
|
|---|
Method description: defines the application language. Parameters:
|
MaccessSet
|
|---|
Method description: provides the mAccess ID associated to its service Parameters:
|
Storage
StorageDataChanged
|
|---|
Method description: indicates whether the stored data has changed. When true, the host should call Returns:
|
StorageDataGet
|
|---|
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
|
|---|
Method description: provides the stored data to the library. This should be done at the app initialization. Parameters:
|
Information
PinMode
|
|---|
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
|
|---|
Method description: indicates whether a major version update of the mAccess library is required. Returns:
|
NewVersionAvailable
|
|---|
Method description: indicates whether a new version of the mAccess library is available. Returns:
|
NewVersionURL
|
|---|
Method description: gets the URL new version Returns:
|
ShouldAskForMinorUpdate
|
|---|
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
|
|---|
Method description: indicates whether the application integrating mAccess library is activated, whether the account is activated with mAccess or not. Returns:
|
MustUpgrade
|
|---|
Method description: indicates whether the application must upgrade first (the local data is from an old version). Returns:
|
IsBlocked
|
|---|
Method description: indicates whether the device is blocked. If yes, it has to be unlocked. Returns:
|
ServiceNb
|
|---|
Method description: indicates the number of services Returns: “1” which means that the application is linked to one service. |
ServiceName
|
|---|
Method description: indicates the name of the TrustBuilder service linked to the application Parameters:
Returns: the service name |
ServiceLogo
|
|---|
Method description: indicates the URL of the service PNG logo. Parameters:
Returns: URL of the service logo |
ServiceDisabled
|
|---|
Method description: indicates whether the service is disabled or not. Parameters:
Returns:
|