BlockIDSDK
public class BlockIDSDK extends Object
↳ package com.onekosmos.blockid.sdk
This class is the entry point of BlockID SDK. This class is used to do initial setup required for the SDK and to access all of it's features.
Constant Summary
| type | parameter |
|---|---|
| String | K_WALLET_CREATION |
| String | K_MESSAGE |
| String | K_WALLET_GENERATED |
| String | K_WALLET_GENERATION_FAILED |
Method Summary
| name | type | parameter | summary |
|---|---|---|---|
| addPreLinkedUser | void | addPreLinkedUser(String userId, BIDOrigin origin, BIDAccount account, LinkUserCallback callback) | Provides an option to add already linked user |
| authenticatePasskey | void | authenticatePasskey(@NonNull Activity activity, @NonNull PasskeyRequest passkeyRequest, @NonNull PasskeyCallback callback) | Authenticate using passkey |
| authenticateUser | void | authenticateUser(@Nullable String userId, String sessionId, LinkedHashMap<String, Object> dataObject, String creds, BIDOrigin bidOrigin, String latitude, String longitude, String versionName, String authFactor, AuthenticateUserCallback authenticateUserCallback) | Authenticate user with preset data (UWL1.0) |
| authenticateUser | void | authenticateUser(@Nullable String userId, String sessionId, String sessionUrl, LinkedHashMap<String, Object> dataObject, String creds, BIDOrigin bidOrigin, String latitude, String longitude, String versionName, String authFactor, AuthenticateUserCallback authenticateUserCallback) | Authenticate user with preset data (UWL2.0) |
| authenticateUser | void | authenticateUser(@NonNullContext context, @Nullable String userId, String sessionId, String scopes, String creds, BIDOrigin bidOrigin, String latitude, String longitude, String versionName, HashMap<String, Object> extraData, String authFactor, AuthenticateUserCallback callback) | Authenticate user with scope (UWL1.0) |
| authenticateUser | void | authenticateUser(@NonNullContext context, @Nullable String userId, String sessionId, String sessionUrl, String scopes, LinkedHashMap<String, Object> metadata, String creds, BIDOrigin bidOrigin, String latitude, String longitude, String versionName, HashMap<String, Object> extraData, String authFactor, boolean isRejected, AuthenticateUserCallback callback) | Authenticate user with scope (UWL2.0) |
| checkDeviceFingerPrintEnabled | BIDGenericResponse | checkDeviceFingerPrintEnabled() | Checks if fingerprint is enabled on device |
| checkIfDeviceIsSecured | BIDGenericResponse | checkIfDeviceIsSecured() | Checks and indicates if keyguard security is enabled in phone device |
| checkUserExist | void | checkUserExist(@NonNull String userId, @NonNull BIDOrigin origin, CheckUserExistCallback callback) | Checks if the user exists with the given userid and origin. |
| commitApplicationWallet | void | commitApplicationWallet() | Commits the application's wallet if tenant registration is successful |
| commitRestorationData | void | commitRestorationData() | Commits the application's restoration data |
| createAccesscode | void | createAccessCode(CreateAccessCodePayload, AccessCodeCallback callback) | Create access for email verification |
| createDocumentSession | void | createDocumentSession(@NonNull Context context, @NonNull String docType, DocumentSessionCallback callback) | Generate Document Scan Session |
| createDocumentSession | void | createDocumentSession(@NonNull Context context, @NonNull String docType, @Nullable String dvcID, @Nullable String uid, DocumentSessionCallback callback) | Generate Document Scan Session |
| decryptString | String | decryptString(String inputData, String senderKey) | Performs decryption of data with the given public key |
| encryptString | String | encryptString(String inputData, String rcptKey) | Performs encryption of data with the given public key |
| enrollPin | void | enrollPin(String pin, String proofedBy, BIDDocumentProvider.IDocumentEnrollmentListener enrollListener) | Register pin for login purpose |
| fetchCommunityConfig | void | fetchCommunityConfig(@NonNull BIDTenant tenant, @NonNull String keyPath, FetchConfigCallback callback) | Fetches and returns Community Level Configurations. |
| fetchConfig | void | fetchConfig(@NonNull String tenantDns, @NonNull String keyPath, FetchConfigCallback callback) | Fetches and returns Global Configurations |
| fetchUserByUserName | void | fetchUserByUserName(Context context, BIDTenant tenant, String userName, IFetchUserByUserNameResponseCallback callback) | Fetch user account info by user name |
| fetchDocuments | void | fetchDocuments(HashMap<String, Object> requestMap, FetchDocumentsCallback callback) | Fetches and returns user documents from server |
| generateNewSession | void | generateNewSession(BIDOrigin origin, String authType, String scopes, GenerateNewSessionListener generateNewSessionListener) | Generate new session |
| getAppTenant | BIDTenant | getAppTenant() | Returns registered app tenant object. |
| getBiometricAssetEnrollments | Enrollments.BiometricAssets | getBiometricAssetEnrollments() | Returns an instance of BiometricAssets class |
| getCommunityinfo | void | getCommunityInfo(BIDTenant tenant, CommunityInfoCallback callback) | Get community information |
| getCurrentDvcID | string | getCurrentDvcID() | Returns the current DvcID set for the SDK. |
| getDID | String | getDID() | Get DID of application. DID is a unique Distributed IDentifier |
| getDigitalAssetEnrollments | Enrollments.DigitalAssets | getDigitalAssetEnrollments() | Returns an instance of DigitalAssets |
| getIAL | void | getIAL(IALCallback callback) | Returns the current IAL (Identity Assurance Level) of user |
| getInstance | static BlockIDSDK | getInstance() | Returns an instance of BlockIDSDK |
| getKYC | void | getKYC(KYCCallback callback) | Get KYC hash |
| getLicenseModule | BIDGenericResponse | getLicenseModule() | Returns license modules setup for given tenant |
| getLinkedUserList | BIDGenericResponse | getLinkedUserList() | Returns list of all users linked to DID (Distributed IDentifier) |
| getLiveIdImage | BIDGenericResponse | getLiveIdImage() | Returns registered Live ID bitmap image |
| getMessageGateways | void | getMessageGateways(@NonNull BIDTenant tenant, MessageGatewaysCallback callback) | Returns list of message gateways available for given tenant |
| getMnemonic | List<String> | getMnemonic() | Returns 12 Mnemonic Phrases. Used for the restoration of a wallet in the future |
| getPersonalAssetEnrollments | Enrollments.PersonalAssets | getPersonalAssetEnrollments() | Returns an instance of PersonalAssets class |
| getPasswordPolicy | void | getPasswordPolicy(@NonNull BIDLinkedAccount account, @NonNull PasswordPolicyCallback callback) | Returns password policy for provided Account. |
| getProxyDetails | ProxyDetails | getProxyDetails() | Returns proxy details |
| getPublicKey | String | getPublicKey() | Returns application wallet's public key |
| getRemovedAccountList | void | getRemovedAccountList(UserAccountsRemovedCallback callback) | Returns orphan accounts if any are removed |
| getScopes | void | getScopes(String userId, String scopes, String creds,BIDOrigin bidorigin, String lat, String longitude, GetScopeCallback callback) | Returns user's data based on defined scopes (e.g. firstName, ial, dl_object) |
| getSelectedAccount | BIDGenericResponse | getSelectedAccount() | Returns the selected user account |
| getServerPublicKey | String | getServerPublicKey() | Returns server public key of registered tenant |
| getSessionResponse | void | getSessionResponse(String sessionURL, String sessionId, GetNewSessionListener getNewSessionListener) | Get session response for given session URL and sessionID |
| getTenant | BIDTenant | getTenant() | Returns root of registered app tenant object |
| getTOTP | BIDGenericResponse | getTOTP() | Returns time based OTP value |
| getTOTP | BIDGenericResponse | getTOTP(String otpSeed) | Returns time based OTP value based on given OTP seed |
| getVC | void | getVC(@NonNull String downloadURL, @NonNull VCCallback callback) | Returns VC data from download URL |
| getVersion | String | getVersion() | Returns BlockID SDK version |
| getVP | void | getVP(JSONObject vcData, VPCallback callback) | Returns VP object based on VC data |
| initialize | static void | initialize(Context context) | Initializes and creates an instance of BlockIDSDK |
| initiateWallet | void | initiateWallet() | Initializes and creates application wallet. The wallet contains DID, 12 Mnemonic Phrases, Public Key, and Private Key |
| isBiometricAssetsEnabled | boolean | isBiometricAssetsEnabled() | Check and indicates if the biometric assets (Pin, Face ID / Touch ID, Live ID) are registered |
| isDeviceAuthEnrolled | boolean | isDeviceAuthEnrolled() | Checks and indicates if user has setup biometric option for login purpose |
| isDeviceFingerPrintEnable | BIDGenericResponse | isDeviceFingerPrintEnable() | Checks and indicates if user has enabled fingerprint on the device |
| isDeviceSecure | BIDGenericResponse | isDeviceSecure(Context context) | Checks and indicates if keyguard security is enabled in phone device |
| isDigitalAssetsEnabled | boolean | isDigitalAssetsEnabled() | Checks and indicates if digital assets are enabled. |
| isLiveIDRegistered | boolean | isLiveIDRegistered() | Checks and indicates if user has registered Live ID |
| isPersonalAssetsEnabled | boolean | isPersonalAssetsEnabled() | Check and indicates if any of the personal assets (email, phone) are enabled. |
| isPinRegistered | boolean | isPinRegistered() | Checks and indicates if user has setup (registered) login Pin |
| isReady | boolean | isReady() | Checks and indicates if the SDK is ready for use. BlockIDSDK must be ready before using any functions of SDK |
| isRestoreModeOn | boolean | isRestoreModeOn() | Checks and indicates id the restore mode is set to true |
| isRestoreWalletEnabled | void | isRestoreWalletEnabled(@NonNull String tenantDns,@NonNull RestoreWalletEnabledCallback callback) | Returns true/false if Wallet Restoration is enabled or not. |
| issueJWTOnPasskeyAuthentication | void | issueJWTOnPasskeyAuthentication(@NonNull Activity activity, @NonNull PasskeyRequest passkeyRequest, @NonNull PasskeyCallback callback) | Issue JWT using passkey Authentication. |
| isTrustedSessionSource | boolean | isTrustedSessionSource(String sessionUrl, TrustedSessionSourceCallback callback) | Checks and indicates if the given session URL is trusted by BlockID SDK |
| pollDocumentSession | void | pollDocumentSession(@NonNull Context context, @NonNull String sessionId, PollSessionCallback callback) | Poll Document Scan Session to get scanned document result. |
| pollDocumentSession | void | pollDocumentSession(@NonNull Context context, @NonNull String sessionId, @Nullable String dvcID, PollSessionCallback callback) | Poll Document Scan Session to get scanned document result. |
| redeemAccessCode | void | redeemAccessCode(String code, String lat, String lon, String pushID, String pushProvider, String versionName, AddAccountCallback addAccountCallback) | Redeem access code |
| registerDocument | void | registerDocument(Context context, LinkedHashMap<String, Object> dataObject, Bitmap liveIdBitmap, String liveIdProofedBy, String docSignToken, String liveIdSignToken, @Nullable String mobileSessionID, @Nullable String mobileDocumentID, BIDDocumentProvider.IDocumentEnrollmentListener enrollListener) | Store (add) the given document data along with Live ID |
| registerDocument | void | registerDocument(Context context, LinkedHashMap<String, Object> dataObject, Bitmap liveIdBitmap, String liveIdProofedBy, String docSignToken, String liveIdSignToken, boolean storeArtifacts, boolean syncArtifacts, @Nullable String mobileSessionID, @Nullable String mobileDocumentID, BIDDocumentProvider.IDocumentEnrollmentListener enrollListener) | Store (add) the given document data along with Live ID. This method must should be used IF you do not want to store and/or sync your document data on BlockID platform |
| registerDocument | void | registerDocument(Context context, LinkedHashMap dataObject, String signToken, @Nullable String mobileSessionID, @Nullable String mobileDocumentID, BIDDocumentProvider.IDocumentEnrollmentListener enrollListener) | Store (add) the given document data |
| registerDocument | void | registerDocument(Context context, LinkedHashMap dataObject, String signToken, boolean storeArtifacts, boolean syncArtifacts, @Nullable String mobileSessionID, @Nullable String mobileDocumentID, BIDDocumentProvider.IDocumentEnrollmentListener enrollListener) | Store (add) the given document data. This method must should be used IF you do not want to store and/or sync your document data on BlockID platform |
| registerPasskey | void | registerPasskey(@NonNull Activity activity, @NonNull PasskeyRequest passkeyRequest, @NonNull PasskeyCallback callback) | Registers passkey |
| registerPasskeyWithAccountLinking | void | registerPasskeyWithAccountLinking(@NonNull Activity activity, @NonNull PasskeyRequest passkeyRequest, @NonNull PasskeyCallback callback) | Register passkey with account linking |
| registerTenant | void | registerTenant(BIDTenant bidTenant, BIDTenantRegistryCallback callback) | Sets application tenant details in SDK. Tenant details must be set once. Make sure to register tenant call one time because tenant details are set only one time |
| resetPassword | void | resetPassword(String userID, String password, String newPassword, BIDAccount account, BIDOrigin bidOrigin, ResetPasswordCallback resetPasswordCallback) | Resets user's password |
| resetRestorationData | void | resetRestorationData() | Resets all restoration data |
| resetSDK | void | resetSDK(String licenseKey, BIDTenant rootTenant, String resetReason) | Purges the SDK wallet and all data stored/owned by the SDK |
| restoreUserDataFromWallet | void | restoreUserDataFromWallet(IAccountRestoreListener accountRestoreListener) | Performs user data restoration from application's wallet |
| restoreWallet | void | restoreWallet(List<String> mnemonicPhrase) | Returns if the application's wallet is restored |
| restoreWalletWithLiveID | void | restoreWalletWithLiveID(@NonNull Context context, @NonNull String rootTenantDNS, @NonNull String communityName, boolean enableScreenProtection, @NonNull RestoreWalletWithLiveIDCallback callback) | Restore the wallet using LiveID |
| restoreWalletWithLiveID | void | restoreWalletWithLiveID(@NonNull Context context, @NonNull String rootTenantDNS, @NonNull String communityName, @NonNull String dvcID, boolean enableScreenProtection, @NonNull RestoreWalletWithLiveIDCallback callback) | Restore the wallet using LiveID |
| setDvcId | void | setDvcId(@NonNull String dvcId) | Sets application's dvcID (Document Verification Connector Identifier) |
| setLicenseKey | void | setLicenseKey(@NonNull String key) | Sets application's license key |
| setLinkedAccountsJSON | void | setLinkedAccountsJSON(String acountsJSON) | Set Accounts JSON in the SDK's local storage |
| setLiveID | void | setLiveID(Bitmap liveIdBitmap, String proofedBy, String signToken, String livenessResult, @Nullable String mobileSessionID, @Nullable String mobileDocumentID, ILiveIDEnrollListener liveIDResponseListener) | Register (store) user's Live ID data |
| setProxy | void | setProxy(@NonNull String host, int port, @Nullable String userName, @Nullable String password) | Add proxy to all the outbound API calls used within the SDK |
| setRestoreMode | void | setRestoreMode() | Sets user's account restore mode to true |
| setSelectedAccount | void | setSelectedAccount(BIDLinkedAccount account) | Sets an user's linked account as currently selected account |
| unenrollPin | void | unenrollPin(BIDDocumentProvider.IDocumentUnEnrollmentListener unEnrollmentListener) | Remove (delete) the existing Pin |
| unlinkAccount | void | unlinkAccount(BIDLinkedAccount linkedAccount, String pushId, String pushProvider, UnlinkAccountCallback callback) | Unlink the existing user account |
| unRegisterDocument | void | unRegisterDocument(Context context, LinkedHashMap<String, Object> dataObject, BIDDocumentProvider.IDocumentUnEnrollmentListener unEnrollListener) | Remove (delete) the existing document |
| updateAccountInfo | void | updateAccountInfo(@NonNull BIDLinkedAccount account, @NonNull HashMap<String, Object> deviceInfo, @NonNull String pushId, String pushProvider, UpdateAccountInfoCallback callback) | This function is used to update unique origin with device pushID and deviceInfo to server to start getting push notifications after restoring data and accounts to a new device |
| updateAccounts | void | updateAccounts(@NonNull List<BIDLinkedAccount> accountList) | This function updates the account list stored in SDK local storage |
| validateAccessCode | void | validateAccessCode(String code, BIDOrigin origin, ValidateAccessCodeCallback callback) | Check validity of access code.The access code is account redemption code. The access code validation is required before access code redemption. |
| verifyDocument | void | verifyDocument(@NonNull LinkedHashMap<String, Object> document, @NonNull String[] verifications, @Nullable String mobileSessionID, @Nullable String mobileDocumentID, @NonNull IVerifyDocumentListener listener) | Verify document data that user has presented through BlockID partners |
| verifyDocument | void | verifyDocument(@NonNull String dvcID, @NonNull LinkedHashMap<String, Object> document, @NonNull String[] verifications, @Nullable String mobileSessionID, @Nullable String mobileDocumentID, @NonNull IVerifyDocumentListener listener) | Verify document data that user has presented through BlockID partners |
| verifyFaceWithLiveness | void | verifyFaceWithLiveness(Bitmap selfieBitmap, @Nullable String mobileSessionID, @Nullable String mobileDocumentID, BIDAuthProvider.IVerifyFaceWithLivenessCallback callback) | Verifies the face against the enrolled LiveID. A liveness check is performed on the provided selfieBitmap, followed by a comparison with the enrolled LiveID. |
| verifyLiveID | void | verifyLiveID(Context context, Bitmap bitmap, String signToken, String livenessResult, @Nullable String mobileSessionID, @Nullable String mobileDocumentID, BIDAuthProvider.IFaceComparisonListener listener) | Verify Live ID |
| verifyPin | void | verifyPin(String pin) | Returns if the given is verified |
| verifyUserAccount | void | verifyUserAccount(String code, String userID, String password, String phoneNumber, String api, String tag, String community, String versionName, String lat, String lon, String device_id, String pushID, String pushProvider, AddAccountCallback addAccountCallback) | Verify user account |
| emptyOTPSeedsForAccounts | void | emptyOTPSeedsForAccounts(@NonNull EmptyOTPSeedsForAccountsCallback callback) | Empty OTPSeeds for Accounts saved. |
| updateOTPSeedsForAccounts | void | updateOTPSeedsForAccounts(@NonNull List<BIDLinkedAccount> accounts, @NonNull OTPSeedUpdatedCallback callback) | Update OTPSeeds for accounts. |
| updateOTPSeedForSingleAccount | void | updateOTPSeedForSingleAccount(@NonNull BIDLinkedAccount account, @NonNull OTPSeedUpdatedCallback callback) | Update OTPSeed for a single account. |
Method Details
addPreLinkedUser
public void addPreLinkedUser(String userId, BIDOrigin origin, BIDAccount account, LinkUserCallback callback)
- Provides an option to add already linked user
| Parameter | |
|---|---|
| userId | String: UserID of user's account. |
| origin | BIDOrigin: User account origin details |
| account | BIDAccount: An object of BIDAccount. |
| callback | LinkUserCallback: The block to execute after the response is received |
authenticatePasskey
public void authenticatePasskey(@NonNull Activity activity, @NonNull PasskeyRequest passkeyRequest, @NonNull PasskeyCallback callback)
- Authenticate using passkey.
| Parameter | |
|---|---|
| activity | Activity: The current Android Activity context. |
| passkeyRequest | PasskeyRequest: The passkey request object containing BIDTenant, userName, displayName |
| callback | PasskeyCallback: The block to execute after the response is received. |
authenticateUser
public void authenticateUser(@Nullable String userId, String sessionId, LinkedHashMap<String, Object> dataObject, String creds, BIDOrigin bidOrigin, String latitude, String longitude, String versionName, String authFactor, AuthenticateUserCallback authenticateUserCallback)
- Authenticate user with preset data (UWL1.0).
| Parameter | |
|---|---|
| userId | String: UserID of user's account. |
| sessionId | String: Session for authentication. |
| dataObject | LinkedHashMap<String, Object>: Authentication data. |
| creds | String: Credential of user's account. |
| bidOrigin | BIDOrigin: Origin details of a user. |
| latitude | String: Latitude of a user location. |
| longitude | String: Longitude of a user location. |
| versionName | String: Application version number |
| authFactor | String: Performed authentication using which authentication type. |
| authenticateUserCallback | AuthenticateUserCallback: The block to execute after the response is received. |
authenticateUser
public void authenticateUser(@Nullable String userId, String sessionId, String sessionUrl, LinkedHashMap<String, Object> dataObject, String creds, BIDOrigin bidOrigin, String latitude, String longitude, String versionName, String authFactor, AuthenticateUserCallback authenticateUserCallback)
- Authenticate user with preset data (UWL2.0).
| Parameter | |
|---|---|
| userId | String: UserID of user's account. |
| sessionId | String: Session for authentication. |
| sessionUrl | String: Complete session URL containing sessionId. |
| dataObject | LinkedHashMap<String, Object>: Authentication data. |
| creds | String: Credential of user's account. |
| bidOrigin | BIDOrigin: Origin details of a user. |
| latitude | String: Latitude of a user location. |
| longitude | String: Longitude of a user location. |
| versionName | String: Application version number |
| authFactor | String: Performed authentication using which authentication type |
| authenticateUserCallback | AuthenticateUserCallback: The block to execute after the response is received. |
authenticateUser
public void authenticateUser(@NonNull Context context, @Nullable String userId, String sessionId, String scopes, String creds, BIDOrigin bidOrigin, String latitude, String longitude, String versionName, HashMap<String, Object> extraData, String authFactor, AuthenticateUserCallback authenticateUserCallback)
- Authenticate user with scope (UWL1.0).
| Parameter | |
|---|---|
| context | Context: Current activity context. |
| userId | String: UserID of user's account. |
| sessionId | String: Session for authentication. |
| scopes | String: Scopes defined for authentication |
| creds | String: Credential of user's account. |
| bidOrigin | BIDOrigin: Origin details of user. |
| latitude | String: Latitude of user's location. |
| longitude | String: Longitude of user's location. |
| versionName | String: Application version number |
| extraData | HashMap<String, Object>: Extra Data which will append with scope data |
| authFactor | String: Performed authentication using which authentication type |
| authenticateUserCallback | AuthenticateUserCallback: The block to execute after the response is received. |
authenticateUser
public void authenticateUser(@NonNull Context context, @Nullable String userId, String sessionId, String sessionUrl, String scopes, LinkedHashMap<String, Object> metadata, String creds, BIDOrigin bidOrigin, String latitude, String longitude, String versionName, HashMap<String, Object> extraData, String authFactor, boolean isRejected, AuthenticateUserCallback authenticateUserCallback)
- Authenticate user with scope (UWL2.0).
| Parameter | |
|---|---|
| context | Context: Current activity context. |
| userId | String: UserID of user's account. |
| sessionId | String: Session for authentication. |
| sessionUrl | String: Complete session URL containing sessionId. |
| scopes | String: Scopes defined for authentication |
| metadata | LinkedHashMap<String, Object>: Metadata for sign nonce payload |
| creds | String: Credential of user's account. |
| bidOrigin | BIDOrigin: Origin details of user. |
| latitude | String: Latitude of user's location. |
| longitude | String: Longitude of user's location. |
| versionName | String: Application version number |
| extraData | HashMap<String, Object>: Extra Data which will append with scope data |
| authFactor | String: Performed authentication using which authentication type |
| isRejected | boolean: Indicates whether authentication was rejected. - If true: Authentication is rejected. The SDK will not resolve scopes and will only return DID, public key, and user ID. - If false: Authentication is successful, and scopes will be resolved normally. |
| authenticateUserCallback | AuthenticateUserCallback: The block to execute after the response is received. |
checkDeviceFingerPrintEnabled
public BIDGenericResponse checkDeviceFingerPrintEnabled()
- Checks if fingerprint is enabled on device
checkIfDeviceIsSecured
public BIDGenericResponse checkIfDeviceIsSecured()
- Checks and indicates if keyguard security is enabled in phone device.
checkUserExist
public void checkUserExist(@NonNull String userId, @NonNull BIDOrigin origin, CheckUserExistCallback callback)
- Check if the user exists with the given userid and origin.
| Parameter | Description |
|---|---|
| userId | String: Linked user's account Id. |
| origin | BIDOrigin: Origin details. |
| callback | CheckUserExistCallback: The block to execute after the response is received. |
commitApplicationWallet
public void commitApplicationWallet()
- Commits the application's wallet IFF tenant registration is successful.
commitRestorationData
public void commitRestorationData()
- Commits the application's restoration data
createAccessCode
public void createAccessCode(CreateAccessCodePayload payload, AccessCodeCallback callback)
- Create access for email verification
| Parameter | |
|---|---|
| Payload | CreateAccessCodePayload: access code payload |
| accessCodeCallback | AccessCodeCallback: The block to execute after the response is received. |
createDocumentSession
public void createDocumentSession(@NonNull Context context, @NonNull String docType, DocumentSessionCallback callback)
- Create Document Scan session
| Parameter | Description |
|---|---|
| context | Context: Activity Context |
| docType | String: Type of document |
| callback | DocumentSessionCallback: The block to execute after the response is received. |
createDocumentSession
public void createDocumentSession(@NonNull Context context, @NonNull String docType, @Nullable String dvcID, @Nullable String uid, DocumentSessionCallback callback)
- Create Document Scan session.
| Parameter | Description |
|---|---|
| context | Context: Activity Context |
| docType | String: Type of document |
| dvcId | String: Application's dvcID (Document Verification Connector Identifier) |
| uid | String: UID (Unique ID by using it you can filter in AdminX→Verifications). |
| callback | DocumentSessionCallback: The block to execute after the response is received. |
decryptString
public String decryptString(String inputData, String senderKey)
- Performs decryption of data with the given public key.
| Parameter | |
|---|---|
| inputData | String: Data to decrypt |
| senderKey | String: Public key used to decrypt the data |
encryptString
public String encryptString(String inputData, String rcptKey)
- Performs encryption of data with the given public key.
| Parameter | |
|---|---|
| inputData | String: Data to encrypt |
| senderKey | String: Public key used to encrypt the data |
enrollPin
public void enrollPin(String pin, String proofedBy, BIDDocumentProvider.IDocumentEnrollmentListener enrollListener)
- Register Pin for login purposes.
| Parameter | |
|---|---|
| pin | String: Pin to enroll (register) |
| proofedBy | String: This identifies the entity responsible for proofing. The default value is “blockid” |
| enrollListener | BIDDocumentProvider.IDocumentEnrollmentListener: The block to execute after the response is received. |
fetchCommunityConfig
public void fetchCommunityConfig(@NonNull BIDTenant tenant, @NonNull String keyPath, FetchConfigCallback callback)
- Fetches & returns Community Level Configurations.
| Parameter | |
|---|---|
| tenant | BIDTenant: Tenant Object |
| keyPath | String: key path (ex. applications.mobile) |
| callback | FetchConfigCallback: The block to execute after the response is received. |
fetchConfig
public void fetchConfig(@NonNull String tenantDns, @NonNull String keyPath, FetchConfigCallback callback)
- Fetches & returns Global Configurations
| Parameter | |
|---|---|
| tenantDns | String : Tenant DNS. |
| keyPath | String: key path |
| callback | FetchConfigCallback : The block to execute after the response is received. |
fetchDocuments
public void fetchDocuments(HashMap<String, Object> requestMap, FetchDocumentsCallback callback)
- Fetches & returns user documents from server
| Method Parameter | |
|---|---|
| requestMap | HashMap<String, Object>: Document hashmap to be fetched |
| callback | FetchDocumentsCallback: The block to execute after the response is received. |
| RequestMap Parameter | |
|---|---|
| categories | String[ ]: Document category to fetch (ex. identity_document, misc_document) |
| id | String[ ]: Document ID to fetch |
| type | String[ ]: Document Type to fetch (ex. dl, ppt, nationalid, ssn) |
| metadataOnly | boolean true: Get metadata only false: Get metadata and actual document data Example metadata: {"type": "dl","id": "12345","proofedBy": "blockid","category": "identity_document","doe": "20001029","proofs": ["any proof if present"]} |
emptyOTPSeedsForAccounts
public void emptyOTPSeedsForAccounts(@NonNull EmptyOTPSeedsForAccountsCallback callback)
Empty OTPSeeds for Accounts saved.
| Parameter | |
|---|---|
| callback | EmptyOTPSeedsForAccountsCallback: The block to execute after the response is received. |
updateOTPSeedsForAccounts
public void updateOTPSeedsForAccounts(@NonNull List<BIDLinkedAccount> accounts, @NonNull OTPSeedUpdatedCallback callback)
Update OTP seed for list of accounts passed.
| Parameter | |
|---|---|
| accounts | List<BIDLinkedAccount>: List of BIDLinkedAccount. |
| callback | OTPSeedUpdatedCallback: The block to execute after the response is received. |
updateOTPSeedForSingleAccount
public void updateOTPSeedForSingleAccount(@NonNull BIDLinkedAccount account, @NonNull OTPSeedUpdatedCallback callback)
Update OTP seed for a single account.
| Parameter | |
|---|---|
| account | BIDLinkedAccount: Object for BIDLinkedAccount. |
| callback | OTPSeedUpdatedCallback: The block to execute after the response is received. |
fetchUserByUserName
public void fetchUserByUserName(Context context, BIDTenant tenant, String userName, IFetchUserByUserNameResponseCallback callback)
- Fetch user account info by user name
| Parameter | |
|---|---|
| context | Context: Activity Context |
| tenant | BIDTenant: BIDTenant Object |
| userName | String: User Name |
| callback | IFetchUserByUserNameResponseCallback: The block to execute after the response is received |
generateNewSession
public void generateNewSession(BIDOrigin origin, String authType, String scopes, String metadata, GenerateNewSessionListener generateNewSessionListener)
- Generate new session.
| Parameter | |
|---|---|
| origin | BIDOrigin: Origin details |
| authType | String: Authentication type |
| scopes | String: Scopes (comma separated) value. |
| generateNewSessionListener | GenerateNewSessionListener: The block to execute after the response is received |
| metadata | String: metadata value |
getAppTenant
public BIDTenant getAppTenant()
- Returns registered app tenant object.
getBiometricAssetEnrollments
public Enrollments.BiometricAssets getBiometricAssetEnrollments()
- Returns an instance of BiometricAssets class.
getCommunityInfo
public void getCommunityInfo(BIDTenant tenant, CommunityInfoCallback callback)
- Fetches the community information
| Parameter | |
|---|---|
| tenant | BIDTenant: Origin details. |
| callback | CommunityInfoCallback: The block to execute after the response is received. |
getCurrentDvcID
public String getCurrentDvcID()
- Returns the current DvcID set for the SDK
getDID
public String getDID()
- Get DID of application. DID is a unique Distributed IDentifier.
getDigitalAssetEnrollments
public Enrollments.DigitalAssets getDigitalAssetEnrollments()
- Returns an instance of DigialAssets class
getIAL
public void getIAL(IALCallback callback)
- Returns the current IAL (Identity Assurance Level) of user.
| Parameter | |
|---|---|
| callback | IALCallback : The block to execute after the response is received. |
getInstance
public static BlockIDSDK getInstance()
- Returns an instance of BlockIDSDK.
getKYC
public void getKYC(KYCCallback callback)
- Get KYC Hash
| Parameter | |
|---|---|
| callback | KYCCallback: The block to execute after the response is received. |
getLicenseModule
public BIDGenericResponse getLicenseModule()
- Returns license modules setup for given tenant.
getLinkedUserList
public BIDGenericResponse getLinkedUserList()
- Returns list of all users linked to DID (Distributed Identifier).
getLiveIdImage
public BIDGenericResponse getLiveIdImage()
- Returns registered Live ID Bitmap image.
getMessageGateways
public void getMessageGateways(@NonNull BIDTenant tenant, MessageGatewaysCallback callback)
- Returns a list of the message gateways available for the given tenant.
| Parameters | |
|---|---|
| tenant | BIDTenant: Tenant details. |
| callback | MessageGatewaysCallback: The block to execute after the response is received. |
getMnemonic
public List<String> getMnemonic()
- Returns 12 Mnemonic Phrases. Used for the restoration of a wallet in the future.
getPersonalAssetEnrollments
public Enrollments.PersonalAssets getPersonalAssetEnrollments()
- Return an instance of PersonalAssets class
getPasswordPolicy
public void getPasswordPolicy(@NonNull BIDLinkedAccount account, @NonNull PasswordPolicyCallback callback)
- Return password policy for provided BIDLinkedAccount
| Parameters | |
|---|---|
| account | BIDLinkedAccount: Requested account |
| callback | PasswordPolicyCallback: The block to execute after the response is received. |
getProxyDetails
public ProxyDetails getProxyDetails()
- Returns proxy details.
getPublicKey
public String getPublicKey()
- Returns application wallet's public key.
getRemovedAccountList
public void getRemovedAccountList(UserAccountsRemovedCallback callback)
- Returns any orphan accounts that were removed, if present.
| Parameter | Description |
|---|---|
| callback | UserAccountsRemovedCallback : The block to execute after the response is received. |
getScopes
public void getScopes(String userId, String scopes, String creds, BIDOrigin bidorigin, String lat, String longitude, GetScopeCallback callback)
- Returns user's data based on defined scopes (e.g. firstName, ial, dl_object).
| Parameters | |
|---|---|
| userId | String: UserID of user account |
| scopes | String: Comma separated scopes |
| creds | String: User's credentials |
| bidorigin | BIDOrigin: Origin details of user |
| lat | String: Latitude of user's location. |
| longitude | String: Longitude of user's location. |
| callback | GetScopeCallback: Callback to return scope data. |
getSelectedAccount
public BIDGenericResponse getSelectedAccount()
- Returns the selected user account.
getServerPublicKey
public String getServerPublicKey()
- Returns server public key of registered tenant.
getSessionResponse
public void getSessionResponse(String sessionURL, String sessionId, GetNewSessionListener getNewSessionListener)
- Get session response for given session URL and sessionID.
| Parameters | |
|---|---|
| sessionURL | String: Session URL for which response is required. |
| sessionId | String: SessionID for which response is required. |
| getNewSessionListener | GetNewSessionListener: The block to execute after the response is received |
getTenant
public BIDTenant getTenant()
- Returns root of registered app tenant object.
getTOTP
public BIDGenericResponse getTOTP()
- Returns time based OTP value
getTOTP
public BIDGenericResponse getTOTP(String otpSeed)
- Returns time based OTP value based on given OTP seed.
| Parameters | |
|---|---|
| otpSeed | String: OTP seed to generate TOTP |
getVC
public void getVC(@NonNull String downloadURL, @NonNull VCCallback callback)
- Returns VC data from download URL
| Parameters | |
|---|---|
| downloadURL | String: Issued VC download URL |
| callback | VCCallback: The block to execute after the response is received. |
getVersion
public String getVersion()
- Returns BlockID SDK version.
initialize
public static void initialize(Context context)
Initializes and creates an instance of BlockIDSDK.
| Parameter | |
|---|---|
| context | Context: Application context. |
getVP
public void getVP(JSONObject vcData, VPCallback callback)
- Returns VP object based on VC data
| Parameters | |
|---|---|
| vcData | JSONObject: VC Data for which VP has to be created |
| callback | VPCallback: The block to execute after the response is received. |
initiateWallet
public void initiateWallet()
- Initializes and creates application wallet. The wallet contains DID, 12 Mnemonic Phrases, Public Key, and Private Key.
isBiometricAssetsEnabled
public boolean isBiometricAssetsEnabled()
- Check and indicates if the biometric assets (Pin, Face ID / Touch ID, Live ID) are enabled.
isDeviceAuthEnrolled
public boolean isDeviceAuthEnrolled()
- Checks and indicates if user has setup biometric option for login purpose.
isDeviceFingerPrintEnable
public BIDGenericResponseisDeviceFingerPrintEnable()
- Checks and indicates if user has enabled fingerprint on the device.
isDeviceSecure
public BIDGenericResponseisDeviceSecure(Context context)
- Checks and indicates if keyguard security is enabled in phone device.
| Parameter | |
|---|---|
| context | Context: Activity context |
isDigitalAssetsEnabled
public boolean isDigitalAssetsEnabled()
- Checks and indicates if digital assets are enabled
isLiveIDRegistered
public boolean isLiveIDRegistered()
- Checks and indicates if user has registered Live ID.
isPersonalAssetsEnabled
public boolean isPersonalAssetsEnabled()
- Check and indicates if any of the personal assets (email, phone) are enabled.
isPinRegistered
public boolean isPinRegistered()
- Checks and indicates if user has setup (registered) login Pin.
isReady
public boolean isReady()
- Checks and indicates if the SDK is ready for use. BlockIDSDK must be ready before using any functions of SDK.
isRestoreModeOn
public boolean isRestoreModeOn()
- Checks and indicates if the restore mode is set to true.
isRestoreWalletEnabled
public void isRestoreWalletEnabled(@NonNull String tenantDns, @NonNull RestoreWalletEnabledCallback callback)
- Returns true/false if Wallet Restoration is enabled or not.
| Parameter | |
|---|---|
| tenantDns | String: tenant Dns. |
| callback | RestoreWalletEnabledCallback: The block executes after the response is received. |
issueJWTOnPasskeyAuthentication
public void issueJWTOnPasskeyAuthentication(@NonNull Activity activity, @NonNull PasskeyRequest passkeyRequest, @NonNull PasskeyCallback callback)
- Issue JWT using passkey Authentication
| Parameter | |
|---|---|
| activity | Activity: The current Android Activity context. |
| passkeyRequest | PasskeyRequest: The passkey request object containing BIDTenant, userName |
| callback | PasskeyCallback: The block to execute after the response is received. |
isTrustedSessionSource
public void isTrustedSessionSource(String sessionUrl, TrustedSessionSourceCallback callback)
- Checks and indicates if the given session URL is trusted by BlockID SDK.
| Parameter | |
|---|---|
| sessionUrl | String: Session URL to be verified from list of trusted source |
| callback | TrustedSessionSourceCallback: Session URL to be verified from list of trusted source. |
pollDocumentSession
public void pollDocumentSession(@NonNull Context context, @NonNull String sessionId, PollSessionCallback callback)
- Poll Document Scan Session to get scanned document result.
| Parameter | Description |
|---|---|
| context | Context: Activity Context |
| sessionId | String: Session ID for which polling has to be done |
| callback | PollSessionCallback: The block to execute after the response is received. |
pollDocumentSession
public void pollDocumentSession(@NonNull Context context, @NonNull String sessionId, @Nullable String dvcID, fetch callback)
- Poll Document Scan Session to get scanned document result.
| Parameter | Description |
|---|---|
| context | Context: Activity Context |
| sessionId | String: Session ID for which polling has to be done |
| dvcID | String: Application's dvcID (Document Verification Connector Identifier). |
| callback | PollSessionCallback: The block to execute after the response is received. |
redeemAccessCode
public void redeemAccessCode(String code, String lat, String lon, String pushID, String pushProvider, String versionName, AddAccountCallback addAccountCallback)
- Redeems access code
| Parameter | |
|---|---|
| code | String: Access code to be redeem |
| lat | String: Latitude of user's location. |
| lon | String: Longitude of user's location. |
| pushID | String: User's device pushID (push token). |
| pushProvider | String: Push provider (Ex. firebase) |
| versionName | String: Application version number. |
| addAccountCallback | AddAccountCallback: The block to execute after the response is received. |
registerDocument
public void registerDocument(Context context, LinkedHashMap<String, Object> dataObject, Bitmap liveIdBitmap, String liveIdProofedBy, String docSignToken, String liveIdSignToken, @Nullable String mobileSessionID, @Nullable String mobileDocumentID, BIDDocumentProvider.IDocumentEnrollmentListener enrollListener)
- Store (add) the given document data along with Live ID.
| Parameter | |
|---|---|
| context | Context: Current activity context. |
| dataObject | LinkedHashMap<String, Object>: Document data to be stored |
| liveIdBitmap | Bitmap: Live ID image bitmap to be stored. |
| liveIdProofedBy | String: The entity responsible for proofing the Live ID (selfie). For BlockID Live ID (selfie) scanner, the default value is “blockid” |
| docSignToken | String: Signature token of document to verify if the document data is modified or not |
| liveIdSignToken | String: Signature token of Live ID to verify if the Live ID is modified or not |
| mobileSessionID | @Nullable String: Unique Session ID that can be used for event tracking or validation purposes. |
| mobileDocumentID | @Nullable String: Unique Document ID that can be used for event tracking or validation purposes. |
| enrollListener | BIDDocumentProvider.IDocumentEnrollmentListener: The block to execute after the response is received |
registerDocument
public void registerDocument(Context context, LinkedHashMap<String, Object> dataObject, Bitmap liveIdBitmap, String liveIdProofedBy, String docSignToken, String liveIdSignToken, boolean storeArtifacts, boolean syncArtifacts, @Nullable String mobileSessionID, @Nullable String mobileDocumentID, BIDDocumentProvider.IDocumentEnrollmentListener enrollListener)
- Store (add) the given document data along with Live ID. This method must should be used IF you do not want to store and/or sync your document data on BlockID platform.
| Parameter | |
|---|---|
| context | Context: Current activity context. |
| dataObject | LinkedHashMap<String, Object>: Document data to be stored |
| liveIdBitmap | Bitmap: Live ID image bitmap to be stored. |
| liveIdProofedBy | String: The entity responsible for proofing the Live ID (selfie). For BlockID Live ID (selfie) scanner, the default value is “blockid” |
| docSignToken | String: Signature token of document to verify if the document data is modified or not |
| liveIdSignToken | String: Signature token of Live ID to verify if the Live ID is modified or not |
| storeArtifacts | boolean: Flag to indicate if the document must be stored on BlockID platform |
| syncArtifacts | boolean: Flag to indicate if the document must be synced on BlockID platform |
| mobileSessionID | @Nullable String: Unique Session ID that can be used for event tracking or validation purposes. |
| mobileDocumentID | @Nullable String: Unique Document ID that can be used for event tracking or validation purposes. |
| enrollListener | BIDDocumentProvider.IDocumentEnrollmentListener: The block to execute after the response is received |
registerDocument
public void registerDocument(Context context, LinkedHashMap<String, Object> dataObject, String signToken, @Nullable String mobileSessionID, @Nullable String mobileDocumentID, BIDDocumentProvider.IDocumentEnrollmentListener enrollListener)
- Store (add) the given document data.
| Parameter | |
|---|---|
| context | Context: Current activity context. |
| dataObject | LinkedHashMap<String, Object>: Document data to be stored |
| signToken | String: Signature token of document to verify if the document data is modified or not |
| mobileSessionID | @Nullable String: Unique Session ID that can be used for event tracking or validation purposes. |
| mobileDocumentID | @Nullable String: Unique Document ID that can be used for event tracking or validation purposes. |
| enrollListener | BIDDocumentProvider.IDocumentEnrollmentListener: The block to execute after the response is received |
registerDocument
public void registerDocument(Context context, LinkedHashMap<String, Object> dataObject, String signToken, boolean storeArtifacts, boolean syncArtifacts, @Nullable String mobileSessionID, @Nullable String mobileDocumentID, BIDDocumentProvider.IDocumentEnrollmentListener enrollListener)
- Store (add) the given document data. This method must should be used IF you do not want to store and/or sync your document data on BlockID platform.
| Parameter | |
|---|---|
| context | Context: Current activity context. |
| dataObject | LinkedHashMap<String, Object>: Document data to be stored |
| signToken | String: Signature token of document to verify if the document data is modified or not |
| storeArtifacts | boolean: Flag to indicate if the document must be stored on BlockID platform |
| syncArtifacts | boolean: Flag to indicate if the document must be synced on BlockID platform |
| mobileSessionID | @Nullable String: Unique Session ID that can be used for event tracking or validation purposes. |
| mobileDocumentID | @Nullable String: Unique Document ID that can be used for event tracking or validation purposes. |
| enrollListener | BIDDocumentProvider.IDocumentEnrollmentListener: The block to execute after the response is received |
registerPasskey
public void registerPasskey(@NonNull Activity activity, @NonNull PasskeyRequest passkeyRequest, @NonNull PasskeyCallback callback)
- Registers passkey
| Parameter | |
|---|---|
| activity | Activity: The current Android Activity context. |
| passkeyRequest | PasskeyRequest: The passkey request object containing BIDTenant, userName, displayName |
| callback | PasskeyCallback: The block to execute after the response is received. |
registerPasskeyWithAccountLinking
public void registerPasskey(@NonNull Activity activity, @NonNull PasskeyRequest passkeyRequest, @NonNull PasskeyCallback callback)
- Registers passkey with account linking
| Parameter | |
|---|---|
| activity | Activity: The current Android Activity context. |
| passkeyRequest | PasskeyRequest: The passkey request object containing BIDTenant, userName, deviceName |
| callback | PasskeyCallback: The block to execute after the response is received. |
registerTenant
public void registerTenant(BIDTenant bidTenant, BIDTenantRegistryCallback callback)
- Sets application tenant details in SDK. Tenant details must be set once. Make sure to register tenant call one time because tenant details are set only one time.
| Parameter | |
|---|---|
| tenant | BIDTenant: Tenant details |
| callback | BIDTenantRegistryCallback: The block to execute after the response is received |
resetPassword
public void resetPassword(String userID, String password, String newPassword, BIDAccount account, BIDOrigin bidOrigin, ResetPasswordCallback resetPasswordCallback)
- Resets user's password.
| Parameter | |
|---|---|
| userID | String: Userid of user's account. |
| password | String: Current password of user's account. |
| newPassword | String: New password for user's account. |
| account | BIDAccount: User's account for which password reset is required |
| bidOrigin | BIDOrigin: Origin details of user's account |
| resetPasswordCallback | ResetPasswordCallback: The block to execute after the response is received |
resetRestorationData
public void resetRestorationData()
- Resets all restoration data.
resetSDK
public void resetSDK(String licenseKey, BIDTenant rootTenant, String resetReason)
- Purges the SDK wallet and all data stored/owned by the SDK.
| Parameter | |
|---|---|
| licenseKey | String: Application's license key |
| rootTenant | BIDTenant: Tenant object sent by application. |
| resetReason | String: The reason for which the SDK is being reset. |
restoreUserDataFromWallet
public void restoreUserDataFromWallet(IAccountRestoreListener accountRestoreListener)
- Performs user data restoration from application's wallet.
| Parameter | |
|---|---|
| accountRestoreListener | IAccountRestoreListener: The block to execute after the response is received |
restoreWallet
public boolean restoreWallet(List<String> mnemonicPhrase)
- Returns if the application's wallet is restored.
| Parameter | |
|---|---|
| mnemonicPhrase | List<String>: List of 12 mnemonic phrases |
restoreWalletWithLiveID
public void restoreWalletWithLiveID(@NonNull Context context, @NonNull String rootTenantDNS, @NonNull String communityName, boolean enableScreenProtection, @NonNull RestoreWalletWithLiveIDCallback callback)
- Restore the wallet using LiveID
| Parameter | |
|---|---|
| context | Context: Context of activity |
| rootTenantDNS | String: Root tenant Dns |
| communityName | String: Root tenant community |
| enableScreenProtection | boolean: flag to enable/disable screenshot and screen recording prevention. |
| callback | RestoreWalletWithLiveIDCallback: The block to execute after the response is received. |
restoreWalletWithLiveID
public void restoreWalletWithLiveID(@NonNull Context context, @NonNull String rootTenantDNS, @NonNull String communityName, @NonNull String dvcID, boolean enableScreenProtection, @NonNull RestoreWalletWithLiveIDCallback callback)
- Restore the wallet using LiveID.
| Parameter | |
|---|---|
| context | Context: Context of activity |
| rootTenantDNS | String: Root tenant Dns |
| communityName | String: Root tenant community |
| dvcID | String: Document Verification Connector Identifier. |
| enableScreenProtection | boolean: flag to enable/disable screenshot and screen recording prevention. |
| callback | RestoreWalletWithLiveIDCallback: The block to execute after the response is received. |
setDvcId
public void setDvcId(@NonNull String dvcId)
- Sets application's dvcID (Document Verification Connector Identifier).
| Parameter | |
|---|---|
| dvcId | String: Application's dvcID (Document Verification Connector Identifier) |
setLicenseKey
public void setLicenseKey(@NonNull String key)
- Sets application's license key.
| Parameter | |
|---|---|
| key | String: Application's license key |
setLinkedAccountsJSON
public void setLinkedAccountsJSON(String acountsJSON)
- Set Accounts JSON in the SDK's local storage.
| Parameter | |
|---|---|
| accountsJSON | String: Accounts JSON string |
setLiveID
public void setLiveID(Bitmap liveIdBitmap, String proofedBy, String signToken, String livenessResult, @Nullable String mobileSessionID, @Nullable String mobileDocumentID, ILiveIDEnrollListener liveIDResponseListener)
- Register (store) user's Live ID data.
| Parameter | |
|---|---|
| liveIdBitmap | Bitmap: Live ID (Selfie) image |
| proofedBy | String: The entity responsible for proofing the Live ID (selfie). For BlockID Live ID (selfie) scanner, the default value is “blockid” |
| signToken | String: Signature token to verify if the Live ID (selfie) data is modified or not |
| livenessResult | String: JSON String result data of Liveness check. |
| mobileSessionID | @Nullable String: Unique Session ID that can be used for event tracking or validation purposes. |
| mobileDocumentID | @Nullable String: Unique Document ID that can be used for event tracking or validation purposes. |
| liveIDResponseListener | ILiveIDEnrollListener: The block to execute after the response is received |
setProxy
public void setProxy(@NonNull String host, int port, @Nullable String userName, @Nullable String password)
- Add proxy to all the outbound API calls used within the SDK.
| Parameter | |
|---|---|
| host | String: The hostname associated with the HTTP proxy |
| port | int: The port number associated with the HTTP proxy |
| userName | String: The username to be used with the proxy. |
| password | String: The password to be used with the proxy. |
setRestoreMode
public void setRestoreMode()
- Sets user's account restore mode to true.
setSelectedAccount
public void setSelectedAccount(BIDLinkedAccount account)
- Sets an user's linked account as currently selected account.
| Parameter | |
|---|---|
| account | BIDLinkedAccount: User's linked account |
unenrollPin
public void unenrollPin(BIDDocumentProvider.IDocumentUnEnrollmentListener unEnrollmentListener)
- Remove (delete) the existing Pin.
| Parameter | |
|---|---|
| unEnrollmentListener | BIDDocumentProvider.IDocumentUnEnrollmentListener: The block to execute after the response is received |
unlinkAccount
public void unlinkAccount(BIDLinkedAccount linkedAccount, String pushId, String pushProvider, UnlinkAccountCallback callback)
- Unlink the existing user account.
| Parameter | |
|---|---|
| linkedAccount | BIDLinkedAccount: Currently linked user account. |
| pushId | String: PushID (push token) of device. |
| pushProvider | String: Push provider (Ex. firebase) |
| callback | UnlinkAccountCallback: The block to execute after the response is received |
unRegisterDocument
public void unRegisterDocument(Context context, LinkedHashMap<String, Object> dataObject, BIDDocumentProvider.IDocumentUnEnrollmentListener unEnrollListener)
- Remove (delete) the existing document.
| Parameter | |
|---|---|
| context | Context: Current activity context. |
| dataObject | LinkedHashMap<String, Object>: Document to be removed. |
| unEnrollListener | BIDDocumentProvider.IDocumentUnEnrollmentListener: The block to execute after the response is received |
updateAccountInfo
public void updateAccountInfo(@NonNull BIDLinkedAccount account, @NonNull HashMap<String,Object> deviceInfo, @NonNull String pushId, String pushProvider, UpdateAccountInfoCallback callback) Linked
- This function is used to update unique origin with device pushID and deviceInfo to server to start getting push notifications after restoring data and accounts to a new device.
| Parameter | |
|---|---|
| account | BIDLinkedAccount : Account |
| deviceInfo | LinkedHashMap<String, Object>: Device Information. Device Information: uid: String // Unique uuid of device os: String // Android | iOS deviceName: String // Device name authenticatorId: String // Mobile app's bundle id authenticatorVersion: String // Mobile app's version authenticatorName: String // Mobile app's name clientIp: String // Device IP address userAgent: String // Device user agent locLat: double // Device latitude locLon: double // Device longitude |
| pushId | String: Device's push Id |
| pushProvider | String: Push provider (Ex. firebase) |
| callback | UpdateAccountInfoCallback: The block to execute after the response is received. |
updateAccounts
public void updateAccounts(@NonNull List<BIDLinkedAccount> accountList)
This function updates the account list stored in SDK local storage.
| parameter | |
|---|---|
| accountList | Lists<BIDLinkedAccount>: Accounts List |
validateAccessCode
public void validateAccessCode(String code, BIDOrigin origin, ValidateAccessCodeCallback callback)
- Check validity of access code. The access code is account redemption code. The access code validation is required before access code redemption.
| Parameter | Description |
|---|---|
| code | String: access code |
| origin | BIDOrigin: Access code origin details |
| callback | ValidateAccessCodeCallback: The block to execute after the response is received. |
verifyDocument
public void verifyDocument(@NonNull LinkedHashMap<String, Object> document, @NonNull String[] verifications, @Nullable String mobileSessionID, @Nullable String mobileDocumentID, @NonNull IVerifyDocumentListener listener)
- Verify document data that user has presented through partners.
| Parameter | |
|---|---|
| document | LinkedHashMap<String, Object>: Hash Map of document data |
| verifications | String[]: List of verification |
| mobileSessionID | @Nullable String: Unique Session ID that can be used for event tracking or validation purposes. |
| mobileDocumentID | @Nullable String: Unique Document ID that can be used for event tracking or validation purposes. |
| listener | IVerifyDocumentListener: The block to execute after the response is received |
verifyDocument
public void verifyDocument(@NonNull String dvcID, @NonNull LinkedHashMap<String, Object> document, @NonNull String[] verifications, @Nullable String mobileSessionID, @Nullable String mobileDocumentID, @NonNull IVerifyDocumentListener listener)
- Verify document data that user has presented through partners.
| Parameter | |
|---|---|
| dvcID | String: Document Verification Connector Identifier. |
| document | LinkedHashMap<String, Object>: Hash Map of document data |
| verifications | String[]: List of verification |
| mobileSessionID | @Nullable String: Unique Session ID that can be used for event tracking or validation purposes. |
| mobileDocumentID | @Nullable String: Unique Document ID that can be used for event tracking or validation purposes. |
| listener | IVerifyDocumentListener: The block to execute after the response is received |
verifyLiveID
public void verifyLiveID(Context context, Bitmap bitmap, String signToken, String livenessResult, @Nullable String mobileSessionID, @Nullable String mobileDocumentID, BIDAuthProvider.IFaceComparisonListener listener)
- Verify Live ID.
| Parameter | |
|---|---|
| context | Context: Context of activity |
| bitmap | Bitmap: Bitmap to compare with enrolled Live ID (selfie) |
| signToken | String: Signature token to verify if the Live ID (selfie) data is modified or not. |
| livenessResult | String: JSON String result data of Liveness check. |
| mobileSessionID | @Nullable String: Unique Session ID that can be used for event tracking or validation purposes. |
| mobileDocumentID | @Nullable String: Unique Document ID that can be used for event tracking or validation purposes. |
| listener | BIDAuthProvider.IFaceComparisonListener: The block to execute after the response is received |
verifyFaceWithLiveness
public void verifyFaceWithLiveness(Bitmap selfieBitmap, @Nullable String mobileSessionID, @Nullable String mobileDocumentID, BIDAuthProvider.IVerifyFaceWithLivenessCallback callback)
- Verifies the face against the enrolled LiveID. A liveness check is performed on the provided selfieBitmap, followed by a comparison with the enrolled LiveID.
| Parameter | Description |
|---|---|
| selfieBitmap | Bitmap: Bitmap to compare with enrolled Live ID. |
| mobileSessionID | @Nullable String: Unique Session ID that can be used for event tracking or validation purposes. |
| mobileDocumentID | @Nullable String: Unique Document ID that can be used for event tracking or validation purposes. |
| callback | BIDAuthProvider.IVerifyFaceWithLivenessCallback: The block to execute after the response is received. |
verifyPin
public boolean verifyPin(String pin)
- Returns if the given PIN is verified.
| Parameter | |
|---|---|
| pin | String: Current Pin for verification |
verifyUserAccount
public void verifyUserAccount(String code, String userID, String password, String phoneNumber, String api, String tag, String community, String versionName, String lat, String lon, String device_id, String pushID, String pushProvider, AddAccountCallback addAccountCallback)
- Verify user account.
| Parameter | |
|---|---|
| code | String: Access code |
| userID | String: UserID of user's account. |
| password | String: Password of user's account. |
| phoneNumber | String: User's phone number |
| api | String: Tenant's URL |
| tag | String: Tenant's tag |
| community | String: Tenant's community name. |
| versionName | String: Application version number. |
| lat | String: Latitude of user's location. |
| lon | String: Longitude of user's location. |
| device_id | String: User's deviceID |
| pushID | String: User's device pushID (push token). |
| pushProvider | String: Push provider (Ex. firebase). |
| addAccountCallback | AddAccountCallback: The block to execute after the response is received |
Interface Summary
| Name | Description |
|---|---|
| AccessCodeCallback | Callback for event when access code created. |
| AddAccountCallback | Callback for event when account is being added. |
| AuthenticateUserCallback | Callback for event when user has been authentication. |
| BIDTenantRegistryCallback | Callback for event when application tenant is registered. |
| CheckUserExistCallback | Callback for event when account existence check is done |
| CommunityInfoCallback | Callback for event when successful fetch community info. |
| DocumentSessionCallback | Callback for event when document scan session is fetched. |
| FetchDocumentsCallback | Callback for event when user's document is fetched. |
| EmptyOTPSeedsForAccountsCallback | Callback for event when user's accounts OTP seeds are Emptied. |
| OTPSeedUpdatedCallback | Callback for event when user's accounts OTP Seeds are updated. |
| FetchConfigCallback | Callback for event when global or community level configs are received. |
| GenerateNewSessionListener | Callback for event when new session is created (generated). |
| GetNewSessionListener | Callback for event when new session is received. |
| GetScopeCallback | Callback for event when scopes are received. |
| GenerateNewSessionListener | Callback for event when new session is created (generated). |
| GetNewSessionListener | Callback for event when new session is received. |
| IAccountRestoreListener | Callback for event when user account is restored. |
| IALCallback | Callback for event when user IAL is received. |
| IFetchUserByUserNameResponseCallback | Callback for event when user's account info is fetched. |
| ILiveIDEnrollListener | Callback for event when Live ID is enrolled (registered). |
| IVerifyDocumentListener | Callback for event when document verification service is used. |
| KYCCallback | Callback for event when KYC has is received. |
| LinkUserCallback | Callback for event when user account is linked. |
| MessageGatewaysCallback | Callback for get message gateways. |
| PollSessionCallback | Callback for event when document session polling response is fetched. |
| PasskeyCallback | The callback interface to handle the result of the passkey operation. |
| ResetPasswordCallback | Callback for event when password is reset. |
| RestoreWalletWithLiveIDCallback | Callback to get is Restore Wallet Enabled. |
| RestoreWalletEnabledCallback | Callback for event when the restore wallet using LiveID verification is completed. |
| TrustedSessionSourceCallback | Callback for Trusted session source |
| UnlinkAccountCallback | Callback for event when user account is unlinked. |
| UpdateAccountInfoCallback | Callback for event when account information is updated. |
| UserAccountsRemovedCallback | Callback for event when User Account Remove call completed and returns the removed orphan account list, status and error. |
| ValidateAccessCodeCallback | Callback for accesscode validation. |
| VCCallback | Callback for event when VC data is received. |
| VPCallback | Callback for event when VP data is received. |
AccessCodeCallback
public interface BlockIDSDK.AccessCodeCallback
- Callback for event when access code created.
Method Summary
void onAccessCodeResponse(boolean status, CreateAccessCodeResponse createAccessCodeResponse, ErrorManager.ErrorResponse error)
| Parameters | |
|---|---|
| status | boolean: Indicates if the access code is created or not. |
| createAccessCodeResponse | CreateAccessCodeResponse: Access code response |
| error | ErrorManager.ErrorResponse: In case of error, an object of ErrorManager.ErrorResponse is returned. |
AddAccountCallback
public static interface BlockIDSDK.AddAccountCallback
- Callback for event when account is being added.
Method Summary
void onAccountAdded(boolean status, ErrorManager.ErrorResponse error)
- Called when account is added.
| Parameters | |
|---|---|
| status | boolean: Indicates if the account is added or not. |
| error | ErrorManager.ErrorResponse: In case of error, an object of ErrorManager.ErrorResponse is returned |
AuthenticateUserCallback
public static interface BlockIDSDK.AuthenticateUserCallback
- Callback for event when user has been authenticated.
Method Summary
void onUserAuthenticated(boolean status, String sessionId, ErrorManager.ErrorResponse error)
- Called when user has been authenticated.
| Parameters | |
|---|---|
| status | boolean: Indicates if the user is authenticated or not. |
| sessionId | String: Returns session id for user authentication. |
| error | ErrorManager.ErrorResponse: In case of error, an object of ErrorManager.ErrorResponse is returned |
BIDTenantRegistryCallback
public static interface BlockIDSDK.BIDTenantRegistryCallback
- Callback for event when application tenant is registered.
Method Summary
void onTenantRegistration(boolean status, ErrorManager.ErrorResponse error, BIDTenant tenant)
- Called when application tenant is registered.
| Parameters | |
|---|---|
| status | boolean: Indicates if the user is linked or not. |
| error | ErrorManager.ErrorResponse: In case of error, an object of ErrorManager.ErrorResponse is returned |
| tenant | BIDTenant: An object of BIDTenant being registered |
CheckUserExistCallback
public static interface BlockIDSDK.CheckUserExistCallback
- Callback for event when account existence check is done.
Method Summary
void onCheckUserExistCallback(boolean status)
- Callback for event when account existence check is done.
| Parameter | |
|---|---|
| status | boolean: Indicates if the user exists or not. |
CommunityInfoCallback
public interface BlockIDSDK.CommunityInfoCallback
- Callback for event when successful fetch community info.
Method Summary
void onCommunityInfoResponse(boolean status, String result, ErrorManager.ErrorResponse errorResponse)
- Callback for event when successful fetch community info.
| Parameter | |
|---|---|
| status | boolean: Indicates whether the community info request succeeded |
| result | String: Json String of Community info |
| error | ErrorManager.ErrorResponse: In case of error, an object of ErrorManager.ErrorResponse is returned. |
DocumentSessionCallback
public static interface BlockIDSDK.DocumentSessionCallback
- Callback for event when document scan session is fetched.
Method Summary
void onDocumentSessionResponse(boolean status, String response, ErrorManager.ErrorResponse error)
- Callback for event when document scan session is fetched.
| Parameters | |
|---|---|
| status | boolean: Indicates if the document scan session is fetched or not. |
| response | StringDocument scan session response |
| error | ErrorManager.ErrorResponse: In case of error, an object of ErrorManager.ErrorResponse is returned. |
FetchDocumentsCallback
public static interface BlockIDSDK.FetchDocumentsCallback
- Callback for event when user's document is fetched.
Method Summary
void onFetchDocumentsCallback(boolean status, LinkedHashMap<String, Object> result, ErrorManager.ErrorResponse error,)
- Callback for event when user's document is fetched.
| Parameters | |
|---|---|
| status | boolean: Indicates if the user''s document is fetched or not. |
| result | LinkedHashMap<String, Object>: A Hash-map of user document is returned |
| error | ErrorManager.ErrorResponse: In case of error, an object of ErrorManager.ErrorResponse is returned. |
FetchUserAccountsInfoCallback
public static interface BlockIDSDK.FetchUserAccountsInfoCallback
Callback for event when user's Account Info is fetched.
Method Summary
void onFetchUserAccountsInfo(boolean status, ErrorManager.ErrorResponse error,)
Callback for event when user's Account Info is fetched.
| Parameters | |
|---|---|
| status | boolean: Indicates if the user's account info is fetched or not. |
| error | ErrorManager.ErrorResponse: In case of error, an object of ErrorManager.ErrorResponse is returned. |
EmptyOTPSeedsForAccountsCallback
public static interface BlockIDSDK.EmptyOTPSeedsForAccountsCallback
Callback for event when user's Accounts OTP Seeds are emptied.
Method Summary
void onEmptyOTPSeedsForAccounts(boolean status, ErrorManager.ErrorResponse error)
Callback for event when user's Accounts OTP Seeds are Emptied.
| Parameter | |
|---|---|
| status | boolean: Indicates if the user's account info is fetched or not. |
| error | ErrorManager.ErrorResponse: In case of error, an object of ErrorManager.ErrorResponse is returned. |
OTPSeedUpdatedCallback
public static interface BlockIDSDK.OTPSeedUpdatedCallback
Callback for event when user's Accounts OTP Seeds are Updated.
Method Summary
void onOTPSeedUpdateCompleted(boolean status, List<OTPSeedUpdatedAccountResult> accountResults, OTPSeedUpdateAction otpSeedUpdateAction)
Callback for event when user's Accounts OTP seeds are updated.
| Parameter | |
|---|---|
| status | boolean: Indicates if the user's accounts OTP seeds are updated or not. |
| accountResults | List<OTPSeedUpdatedAccountResult>: Will get List of object for the success and fail cases. |
| otpSeedUpdateAction | OTPSeedUpdateAction : Will get the action based on Success and Failure cases. |
FetchConfigCallback
public static interface BlockIDSDK.FetchConfigCallback
Callback for event when global or community level configurations are received.
Method Summary
void onFetchConfigCallback(boolean status, String result, ErrorResponse error);
| Parameter | |
|---|---|
| status | boolean: Indicates if config is received or not. |
| result | String: JSON String Config details are returned. |
| error | ErrorManager.ErrorResponse: In case of error, an object of ErrorManager.ErrorResponse is returned. |
GenerateNewSessionListener
public static interface BlockIDSDK.GenerateNewSessionListener
- Callback for event when new session is created (generated).
Method Summary
void onNewSessionGenerated(boolean status, String sessionURL, SessionApi.GenerateNewSessionResponsePayload result, ErrorManager.ErrorResponse errorResponse)
- Called when new session is created (generated).
| Parameters | |
|---|---|
| status | boolean: Indicates if the new session is created (generated) or not |
| sessionURL | String: Result of new session being received. |
| result | SessionApi.GenerateNewSessionResponsePayload: A response payload after new session is created (generated) |
| error | ErrorManager.ErrorResponse: In case of error, an object of ErrorManager.ErrorResponse is returned |
GetScopeCallback
public static interface BlockIDSDK.GetScopeCallback
- Callback for event when scopes are received.
Method Summary
void onGetScopeResponse(LinkedHashMap<String, Object> response, ErrorResponse error)
- Called when all scopes are received.
| Parameters | |
|---|---|
| response | LinkedHashMap<String, Object> : scopes map. |
| error | ErrorManager.ErrorResponse: In case of error, an object of ErrorManager.ErrorResponse is returned. |
GetNewSessionListener
public static interface BlockIDSDK.GetNewSessionListener
- Callback for event when new session is received.
Method Summary
void onNewSessionReceived(boolean status, String result, ErrorManager.ErrorResponse errorResponse)
- Called when new session is received.
| Parameters | |
|---|---|
| status | boolean: Indicates if the new session is received or not |
| result | String: Result of new session being received. |
| error | ErrorManager.ErrorResponse: In case of error, an object of ErrorManager.ErrorResponse is returned |
IAccountRestoreListener
public static interface BlockIDSDK.IAccountRestoreListener
- Callback for event when user account is restored.
Method Summary
void onAccountRestoreListener(boolean status, ErrorManager.ErrorResponse error, String message)
- Called when user account is restored.
| Parameters | |
|---|---|
| status | boolean: Indicates if user account is restored or not. |
| error | ErrorManager.ErrorResponse: In case of error, an object of ErrorManager.ErrorResponse is returned |
| message | String: Error / Success message |
IFetchUserByUserNameResponseCallback
public static interface BlockIDSDK.IFetchUserByUserNameResponseCallback
- Callback for event when user's account info is fetched.
Method Summary
void onFetchUserResponse(boolean status, String response, ErrorResponse error)
Called when user's Account info is received.
| Parameters | |
|---|---|
| status | boolean: Indicates if the user's account info is fetched or not. |
| response | String: JSON String User's Account info |
| error | ErrorManager.ErrorResponse: In case of error, an object of ErrorManager.ErrorResponse is returned |
IALCallback
public static interface BlockIDSDK.IALCallback
- Callback for event when user's IAL is received.
Method Summary
void onIALResponse(boolean status, String ialValue, ErrorResponse error);
- Called when user's IAL is received.
| Parameters | |
|---|---|
| status | boolean: Indicates if user's account validation is required. |
| ialValue | String: Indicates user's current IAL value. |
| error | ErrorManager.ErrorResponse: In case of error, an object of ErrorManager.ErrorResponse is returned. |
ILiveIDEnrollListener
public static interface BlockIDSDK.ILiveIDEnrollListener
- Callback for event when Live ID is enrolled (registered).
Method Summary
void onLiveIDEnrollment(boolean enroll_status, String msg, ErrorManager.ErrorResponse errorResponse)
- Called when Live ID enrollment (registration) is completed.
| Parameters | |
|---|---|
| enroll_status | boolean: Indicates if the Live ID is enrolled (registered) or not |
| msg | String: Error message in case of Live ID enrollment (registered) is failed |
| error | ErrorManager.ErrorResponse: In case of error, an object of ErrorManager.ErrorResponse is returned |
ILiveIDEnrollListener
public static interface BlockIDSDK.ILiveIDEnrollListener
- Callback for event when Live ID is enrolled (registered).
Method Summary
void onLiveIDEnrollment(boolean enroll_status, String msg, ErrorManager.ErrorResponse errorResponse)
Called when Live ID enrollment (registration) is completed.
| Parameters | |
|---|---|
| enroll_status | boolean: Indicates if the Live ID is enrolled (registered) or not. |
| msg | String: Error message in case of Live ID enrollment (registered) is failed. |
| error | ErrorManager.ErrorResponse: In case of error, an object of ErrorManager.ErrorResponse is returned |
IVerifyDocumentListener
public static interface BlockIDSDK.IVerifyDocumentListener
- Callback for event when document verification service is used.
Method Summary
void onDocumentVerify(boolean status, String documentVerification, ErrorResponse error)
- Called when application uses document verification service.
| Parameters | |
|---|---|
| status | boolean: Indicates if the user is linked or not. |
| documentVerification | String: Result of document verification. |
| error | ErrorResponse: In case of error, an object of ErrorResponse is returned |
KYCCallback
public interface BlockIDSDK.KYCCallback
- Callback for event when KYC has is received.
Method Summary
void onKYCResponse(boolean status, String kycHash, ErrorResponse error)
- Called when application uses KYC Hash.
| Parameters | |
|---|---|
| status | boolean: Indicates if the KYV has is generated or not. |
| documentVerification | String: Result of generated hash. |
| error | ErrorResponse: In case of error, an object of ErrorResponse is returned. |
LinkUserCallback
public static interface BlockIDSDK.LinkUserCallback
- Callback for event when user account is linked.
Method Summary
void onLinkedUser(boolean status, ErrorManager.ErrorResponse error)
- Called when user is linked.
| Parameters | |
|---|---|
| status | boolean: Indicates if the user is linked or not. |
| error | ErrorManager.ErrorResponse: In case of error, an object of ErrorManager.ErrorResponse is returned |
MessageGatewaysCallback
public interface BlockIDSDK.MessageGatewaysCallback
- Callback for message gateways.
Method Summary
void onMessageGatewaysResponse(boolean status, ArrayList<MessageGateway> messageGateways, ErrorResponse error)
- Called when requesting a list of gateways
| Parameters | |
|---|---|
| status | boolean: Indicates if get Mesasge Gateway successfully completed or errored |
| messageGateways | ArrayList<MessageGateway>: List of MessageGateway object |
| error | ErrorResponse: In case of error, an object of ErrorManager.ErrorResponse is returned. |
PasswordPolicyCallback
public interface BlockIDSDK.PasswordPolicyCallback
- Callback for get password policy.
Method Summary
void onPasswordPolicyResponse(boolean status, BIDPasswordPolicy result, ErrorResponse error)
- Called when get password policy
| Parameters | |
|---|---|
| status | boolean: Indicates if get Password Policy successfully completed or errored. |
| result | BIDPasswordPolicy object |
| error | ErrorResponse: In case of error, an object of ErrorManager.ErrorResponse is returned. |
PollSessionCallback
public static interface BlockIDSDK.PollSessionCallback
- Callback for event when document session polling result is fetched.
Method Summary
void onPollSessionResponse(boolean status, String response, ErrorManager.ErrorResponse error)
- Called for event when document session polling result is fetched.
| Parameters | |
|---|---|
| status | boolean: Indicates if the password is reset or not. |
| response | String: Poll Document session Response |
| error | ErrorResponse: In case of error, an object of ErrorManager.ErrorResponse is returned. |
PasskeyCallback
public static interface com.onekosmos.blockid.sdk.passKey.PasskeyCallback
- The callback interface to handle the result of the passkey operation.
Method Summary
void onPasskeyResponse(boolean status, PasskeyResponse passkeyResponse, ErrorResponse errorResponse);
- Called when the passkey operation completed (like registerPasskey, authenticatePasskey, registerPasskeyWithAccountLinking, issueJWTOnPasskeyAuthentication)
| Parameters | |
|---|---|
| status | boolean: Indicates operation success or fail. |
| passkeyResponse | PasskeyResponse: In case of success, an object of PasskeyResponse is returned. |
| error | ErrorResponse: In case of error, an object of ErrorManager.ErrorResponse is returned. |
ResetPasswordCallback
public static interface BlockIDSDK.ResetPasswordCallback
- Callback for event when password is reset.
Method Summary
void onPasswordReset(boolean status, ErrorManager.ErrorResponse error)
Called when password is reset.
| Parameters | |
|---|---|
| status | boolean: Indicates if the password is reset or not. |
| error | ErrorResponse: In case of error, an object of ErrorManager.ErrorResponse is returned. |
RestoreWalletEnabledCallback
public static interface BlockIDSDK.RestoreWalletEnabledCallback
- Callback to get is Restore Wallet Enabled.
Method Summary
void onRestoreWalletEnabled(boolean isRestoreWalletEnabled)
- Called when got response for Restore Wallet Enabled
| Parameter | |
|---|---|
| isRestoreWalletEnabled | boolean: Indicates if the wallet is restored. |
RestoreWalletWithLiveIDCallback
public static interface BlockIDSDK.RestoreWalletWithLiveIDCallback
Callback for event when the restore wallet using LiveID verification is completed.
Method Summary
void onRestoreWalletWithLiveIDResponse(boolean status, ErrorResponse error)
Called when the restore wallet using LiveID verification is completed
| Parameters | |
|---|---|
| status | boolean: Indicates if the wallet is restored. |
| error | ErrorResponse: In case of error, an object of ErrorManager.ErrorResponse is returned. |
TrustedSessionSourceCallback
public static interface BlockIDSDK.TrustedSessionSourceCallback
Callback for Trusted session source
Method Summary
void onResult(boolean isTrusted)
| Parameters | |
|---|---|
| isTrusted | boolean: Given session URL is trusted or not |
UnlinkAccountCallback
public static interface BlockIDSDK.UnlinkAccountCallback
Callback for event when user account is unlinked.
Method Summary
void onUnlinkAccount(boolean status, ErrorManager.ErrorResponse error)
Called when user account is unlinked.
| Parameters | |
|---|---|
| status | boolean: Indicates if the user account is unlinked or not. |
| error | ErrorResponse: In case of error, an object of ErrorManager.ErrorResponse is returned. |
UpdateAccountInfoCallback
public static interface BlockIDSDK.UpdateAccountInfoCallback
Callback when account information is updated.
Method Summary
void onUpdateAccountInfo(boolean status, ErrorManager.ErrorResponse error)
Callback when account information is updated.
| Parameters | |
|---|---|
| status | boolean: Indicates if the user account is updated or not. |
| error | ErrorManager.ErrorResponse: In case of error, an object of ErrorManager.ErrorResponse is returned |
UserAccountsRemovedCallback
public static interface BlockIDSDK.UserAccountsRemovedCallback
- Callback for an event when the User Account Remove call is completed and returns the removed orphan account list, status, and error.
Method Summary
void onUserAccountsRemoved(boolean status, List<BIDLinkedAccount> removedAccountList, ErrorManager.ErrorResponse error)
- Callback for event when user account remove call is completed.
| Parameter | |
|---|---|
| status | boolean: Indicates if the user account is updated or not. |
| removedAccountList | List<BIDLinkedAccount>: List of removed accounts. |
| error | ErrorManager.ErrorResponse: In case of error, an object of ErrorManager.ErrorResponse is returned. |
UnlinkAccountCallback
public static interface BlockIDSDK.UnlinkAccountCallback
- Callback for event when user account is unlinked.
Method Summary
void onUnlinkAccount(boolean status, ErrorManager.ErrorResponse error)
- Called when user account is unlinked.
| Parameters | |
|---|---|
| status | boolean: Indicates if the user account is unlinked or not |
| error | ErrorManager.ErrorResponse: In case of error, an object of ErrorManager.ErrorResponse is returned |
UpdateAccountInfoCallback
public static interface BlockIDSDK.UpdateAccountInfoCallback
- Callback when account information is updated.
Method Summary
void onUpdateAccountInfo(boolean status, ErrorManager.ErrorResponse error)
- Callback when account information is updated.
| Parameters | |
|---|---|
| status | boolean: Indicates if the user account is updated or not. |
| error | ErrorManager.ErrorResponse: In case of error, an object of ErrorManager.ErrorResponse is returned. |
ValidateAccessCodeCallback
public static interface BlockIDSDK.ValidateAccessCodeCallback
- Callback for event when VC data is received.
Method Summary
void ifAdValidationRequired(boolean status, BIDGenericResponse bidGenericResponse, String userID, ErrorManager.ErrorResponse error)
Called when get access ocde validation completed.
| Parameters | |
|---|---|
| status | boolean: status of validation |
| bidGenericResponse | BIDGenericResponse: An optional object of BIDGenericResponse |
| userID | String: UserID for which the access code validated |
| error | ErrorManager.ErrorResponse: In case of error, an object of ErrorManager.ErrorResponse is returned. |
VCCallback
public static interface BlockIDSDK.VCCallback
- Callback for event when VC data is received.
Method Summary
void onVCResponse(boolean status, String vcData, ErrorManager.ErrorResponse errorResponse)
- Called when VC data is received.
| Parameters | |
|---|---|
| status | boolean: Indicates if the user account is unlinked or not. |
| vcData | String: VC data |
| errorResponse | ErrorManager.ErrorResponse: In case of error, an object of ErrorManager.ErrorResponse is returned. |
VPCallback
public static interface BlockIDSDK.VPCallback
- Callback for event when VP data is received.
Method Summary
void onVPResponse(boolean status, String vcData, ErrorManager.ErrorResponse error)
- Called when VP data is received.
| Parameters | |
|---|---|
| status | boolean: Indicates if the user account is unlinked or not. |
| result | String: VP data |
| error | ErrorManager.ErrorResponse: In case of error, an object of ErrorManager.ErrorResponse is returned. |