FaceShareGuard

class FaceShareGuard(val policy: FaceCheckPolicy, model: FaceModel) : ShareGuard

"Prove it's you": before a protected credential is shared, the holder looks into the front camera, passes a short liveness step and is matched against the credential's own photo. Nothing is stored and no image leaves the phone.

val sdk = Wallet.createWallet(
issuer, trustedVerifiers, credentialTypes,
shareGuard = FaceShareGuard(
FaceCheckPolicy(docTypes = setOf("org.iso.23220.photoid.1")),
FaceModel.fromBytes(modelBytes),
),
)

With the ready-made screens nothing else is needed, on Android or iOS: the check appears over the screen that is presenting. An iOS app with its own SwiftUI or UIKit screens presents FaceCheckHostViewController once over its root view.

Constructors

Link copied to clipboard
constructor(policy: FaceCheckPolicy, model: FaceModel)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override val docTypes: Set<String>
Link copied to clipboard

Functions

Link copied to clipboard
open suspend override fun beforeShare(share: PendingShare): ShareGuardResult
Link copied to clipboard
open suspend override fun prepare(share: PendingShare): ShareGuardResult