initialize
Initialize the MobileCredentialHolder SDK. The MobileCredentialHolder class is a singleton which can only be initialized with one instanceId at a time. After this initialize method has been called, all subsequent method calls in this class, such as getTrustedIssuerCertificates, will return a result unique to the specified instanceId.
This function requires user authentication to execute successfully. If a suitable user authentication mechanism is not setup on the device OR authentication fails for some reason, suitable exceptions will be thrown. Note that if a user disables authentication on their device after the SDK has already been initialized they will lose all access to their stored credentials, even if they re-enable authentication later. That is because when authentication is disabled, all associated keys become permanently invalid. This means that the key used to decrypt the credentials storage will no longer be available and a HolderException.UserAuthenticationUnrecoverableKeyException will be thrown. To resolve this issue the instance must be deleted using the destroy API and re-initialized.
Parameters
Android activity used to perform user authentication.
Optional parameter to identify the instance to configure when initializing the SDK. This will load all certificates and credentials unique to this instance. If the instance is empty, the default instance will be used.
Optional parameter to configure whether user authentication (biometric or passcode) is required to unlock the storage. Default value is true. The SDK cannot accept further changes to this option with a particular instance id. HolderException.UserAuthenticationOnInitChangedException will be thrown if this option is changed.
Optional parameter, containing configuration options for credential issuance.
Optional parameter to configure the logger behavior.
Throws
If the user cancels the authentication process.
If biometric authentication is locked out.
If the user has not set up authentication.
for general authentication failures.
If storage initialization fails.
If the SDK was initialized with a different instanceId.
If the provided instanceId is invalid.
If user key has been compromised.
If authentication changes during initialization.