BiometryService

public protocol BiometryService : AnyObject

The protocol used to define the necessary specifications for the SDK.

  • A boolean value stating whether the biometric feature is enabled.

    Declaration

    Swift

    var isEnabled: Bool { get set }
  • A boolean value stating whether the biometric feature is available.

    Declaration

    Swift

    var isAvailable: Bool { get }
  • Indicates the type of the biometry supported by the device.

    Declaration

    Swift

    var supportedType: BiometryType { get }
  • Fallback button title.

    Declaration

    Swift

    var localizedFallbackTitle: String? { get set }
  • Cancel button title.

    Declaration

    Swift

    var localizedCancelTitle: String? { get set }
  • Allows setting the default localized authentication reason to show to the user.

    Declaration

    Swift

    var localizedReason: String { get set }
  • Allows running authentication in non-interactive mode.

    Declaration

    Swift

    var interactionNotAllowed: Bool { get set }
  • Authenticates the user when using the application.

    @param completion Completeion block that is executed when authentication finishes. success Completion parameter that is success if the authentication has been excuted successfully. failure Completion parameter that is failed if the authentication has been authenticate failed. contains error information about the authentication’s failure.

    @see BiometryError

    Declaration

    Swift

    func authenticate(completion: @escaping (BiometryResult) -> Void)
  • Invalidates the biometry service

    Declaration

    Swift

    func invalidate()
  • Credential provided by application

    Sets a credential to this service

    @param credential Credential to be used with subsequent calls. Setting this parameter to nil will remove any existing credential of the specified type.

    @param type CredentialType of the provided credential.

    @return YES if the credential was set successfully, NO otherwise.

    Declaration

    Swift

    func setCredential(_ credential: Data?, type: CredentialType) -> Bool
  • Reveals if credential was set with this context.

    @param type CredentialType of credential we are asking for.

    @return YES on success, NO otherwise.

    Declaration

    Swift

    func isCredentialSet(_ type: CredentialType) -> Bool