IdentityCredentialStoreCapabilities

class IdentityCredentialStoreCapabilities


A class that supports querying the capabilities of a IdentityCredentialStore as implemented in secure hardware or in software (backed by Android Keystore).

Capabilities depend on the Android system features and can be queried using getSystemAvailableFeatures and hasSystemFeature. The feature names in question are android.hardware.identity_credential andandroid.hardware.identity_credential_direct_access for the direct access store.

Known feature versions include FEATURE_VERSION_202009 and FEATURE_VERSION_202101.

Summary

Constants

const Int

The feature version corresponding to features included in the Identity Credential API shipped in Android 11.

const Int

The feature version corresponding to features included in the Identity Credential API shipped in Android 12.

Public functions

Int

Returns the feature version of the IdentityCredentialStore.

(Mutable)Set<String!>

Gets a set of supported document types.

Boolean

Returns whether delete is supported by the underlying hardware.

Boolean

Returns whether the credential store is for direct access.

Boolean

Returns whether the credential is backed by Secure Hardware.

Boolean

Returns true if proveOwnership is supported by the underlying hardware.

Boolean

Returns true if storeStaticAuthenticationData is supported by the underlying hardware.

Boolean

Returns true if update is supported by the underlying hardware.

Constants

FEATURE_VERSION_202009

Added in 1.0.0-alpha04
const val FEATURE_VERSION_202009 = 202009: Int

The feature version corresponding to features included in the Identity Credential API shipped in Android 11.

FEATURE_VERSION_202101

Added in 1.0.0-alpha04
const val FEATURE_VERSION_202101 = 202101: Int

The feature version corresponding to features included in the Identity Credential API shipped in Android 12. This feature version adds support for delete, update, proveOwnership, and storeStaticAuthenticationData.

Public functions

getFeatureVersion

Added in 1.0.0-alpha04
fun getFeatureVersion(): Int

Returns the feature version of the IdentityCredentialStore.

Returns
Int

the feature version.

getSupportedDocTypes

Added in 1.0.0-alpha04
fun getSupportedDocTypes(): (Mutable)Set<String!>

Gets a set of supported document types.

Only the direct-access store may restrict the kind of document types that can be used for credentials. The default store always supports any document type.

This always return the empty set for the software-based store.

Returns
(Mutable)Set<String!>

The supported document types or the empty set if any document type is supported.

isDeleteSupported

Added in 1.0.0-alpha04
fun isDeleteSupported(): Boolean

Returns whether delete is supported by the underlying hardware.

This is supported in feature version FEATURE_VERSION_202101 and later.

This is always supported by the software-based store.

Returns
Boolean

true if supported, false if not.

isDirectAccess

Added in 1.0.0-alpha04
fun isDirectAccess(): Boolean

Returns whether the credential store is for direct access.

This always return false for the software-based store.

Returns
Boolean

true if credential store is for direct access, false if not.

isHardwareBacked

Added in 1.0.0-alpha04
fun isHardwareBacked(): Boolean

Returns whether the credential is backed by Secure Hardware.

This always return false for the software-based store.

Note that the software-based store is still using Android Keystore which itself is backed by secure hardware.

Returns
Boolean

true if backed by secure hardware, false if not.

isProveOwnershipSupported

Added in 1.0.0-alpha04
fun isProveOwnershipSupported(): Boolean

Returns true if proveOwnership is supported by the underlying hardware.

This is supported in feature version FEATURE_VERSION_202101 and later.

This is always supported by the software-based store.

Returns
Boolean

true if supported, false if not.

isStaticAuthenticationDataExpirationSupported

Added in 1.0.0-alpha04
fun isStaticAuthenticationDataExpirationSupported(): Boolean

Returns true if storeStaticAuthenticationData is supported by the underlying hardware.

This is supported in feature version FEATURE_VERSION_202101 and later.

This is always supported by the software-based store.

Returns
Boolean

true if supported, false if not.

isUpdateSupported

Added in 1.0.0-alpha04
fun isUpdateSupported(): Boolean

Returns true if update is supported by the underlying hardware.

This is supported in feature version FEATURE_VERSION_202101 and later.

This is always supported by the software-based store.

Returns
Boolean

true if supported, false if not.