MobileCredentialHolder

class MobileCredentialHolder : SdkLifecycle

The entry point for the MobileCredentialHolder SDK.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val initialised: Boolean

Boolean status indicating whether the SDK instance is currently initialised or not.

Functions

Link copied to clipboard
@Blocking
fun addCredential(credential: String, deviceKeyId: String): String

Add a mobile credential to storage.

Link copied to clipboard
@Blocking
fun addTrustedIssuerCertificates(certificates: List<String>): List<String>

Add a trusted issuer certificate to storage.

Link copied to clipboard
@Blocking
fun addTrustedVerifierCertificates(certificates: List<String>): List<String>

Add trusted verifier certificates to storage.

Link copied to clipboard
@Blocking
fun createOnlinePresentationSession(authorisationRequestUri: String, requireTrustedVerifier: Boolean = false): OnlinePresentationSession

Create an online presentation session compliant with the ISO 18013-7 and OpenID4VP.

Link copied to clipboard
suspend fun createProximityPresentationSession(activity: Activity, authenticationOption: AuthenticationOption = AuthenticationOption.Signature, bleMode: BleMode = BleMode.MDocClientCentral, onRequestReceived: ProximityPresentationSession.OnRequestReceived, onConnected: ProximityPresentationSession.OnConnected? = null, onSessionTerminated: ProximityPresentationSession.OnSessionTerminated? = null): ProximityPresentationSession

Create a proximity based presentation session with a mobile credential verifier using the ISO 18013-5 based DeviceRetrieval.

Link copied to clipboard
suspend fun deinitialise()

Deinitialise the MobileCredentialHolder SDK.

Link copied to clipboard
@Blocking
fun deleteCredential(id: String)

Deletes a mobile credential from storage.

Link copied to clipboard
@Blocking
fun deleteTrustedIssuerCertificate(certificateId: String)

Delete a trusted issuer certificate from storage.

Link copied to clipboard
@Blocking
fun deleteTrustedVerifierCertificate(certificateId: String)

Delete a trusted verifier certificate from storage.

Link copied to clipboard
suspend fun destroy(context: Context, instanceId: String = DEFAULT_INSTANCE_ID)

Destroys an instance of the SDK.

Link copied to clipboard

Discover a credential offer.

Link copied to clipboard
suspend fun generateDeviceKey(activity: Activity, popOptions: DeviceKeyPopOptions? = null): GeneratedDeviceKeyResult

Generate a device key for provisioning a new mobile credential.

Link copied to clipboard
@Blocking
fun getCredential(id: String, skipStatusCheck: Boolean = false): MobileCredential

Retrieve a specific mobile credential by id from storage.

Link copied to clipboard
@Blocking
fun getCredentials(skipStatusCheck: Boolean = false): List<MobileCredentialMetaData>

Retrieve all mobile credentials from storage.

Link copied to clipboard

Get the current proximity presentation session.

Link copied to clipboard
fun getLog(): String?

Close and return the full address of the current log file.

Link copied to clipboard

Retrieve all trusted issuer certificates from storage.

Link copied to clipboard

Retrieve all trusted verifier certificates from storage.

Link copied to clipboard
suspend fun initialise(activity: Activity, instanceId: String = DEFAULT_INSTANCE_ID, userAuthRequiredOnInitialise: Boolean = true, loggerConfiguration: Logger.LoggerConfiguration? = null)

Initialise the MobileCredentialHolder SDK. The MobileCredentialHolder class is a singleton which can only be initialised with one instanceId at a time. After this initialise method has been called, all subsequent method calls in this class, such as [getTrustedIssuerCertificates], will return a result unique to the specified instanceId.

Link copied to clipboard
suspend fun retrieveCredentials(activity: Activity, credentialOffer: DiscoveredCredentialOffer, clientId: String, redirectUri: String, autoTrustMobileCredentialIaca: Boolean = false): List<RetrieveCredentialResult>

Retrieve credentials from a credential offer according to the authorization process defined by OIDC4VCI - Authorization code flow