SecureEnclaveSignatureProvider
public protocol SecureEnclaveSignatureProvider
Provides access for gathering biometrics related registration and authentication data.
-
Opens a pairing session and creates a
PairingSession
object with it. ThePairingSession
object must be aborted withabort
when the registration process was unsuccessfull.Throws
SecureEnclaveSignatureProviderErrorDeclaration
Swift
func createPairingSession() throws -> PairingSession
Return Value
Instance of
PairingSession
-
Creates a RegistrationData object using a
JWTSigner
to sign thePairingData
.Declaration
Swift
func signPairingSession(_ pairingSession: PairingSession, with signer: JWTSigner, certificate: X509) -> AnyPublisher<RegistrationData, SecureEnclaveSignatureProviderError>
Parameters
pairingSession
PairingSession
instance that is used to identify the biometric key.signer
The
JWTSigner
that is used to authenticate the key that is paired. Usually this is a eGK.certificate
Certificate of the signer that is used to sign the
PairingData
. -
Cancels the signing session and delete all temporary data, such as
PrK_SE_AUT
andPuK_SE_AUT
.Declaration
Swift
func abort(pairingSession: PairingSession) throws
Parameters
pairingSession
The
PairingSession
that needs cancelation. -
Provides
SignedAuthenticationData
by gathering all necessary data and signing them withPrK_SE_AUT
. Will automatically handle biometric unlock such as FaceID or TouchID.Declaration
Swift
func authenticationData(for challenge: IDPChallengeSession) -> AnyPublisher<SignedAuthenticationData, SecureEnclaveSignatureProviderError>
Parameters
challenge
The
IDPChallengeSession
to sign withPrK_SE_AUT
. -
If the Publishers value is true, biometrics is successfully registered, false otherwise.
Declaration
Swift
var isBiometrieRegistered: AnyPublisher<Bool, Never> { get }