TouchIDChallenge
public final class TouchIDChallenge : ChallengeProtocol
The fingerprint challenge mechanism is an Apple Touch ID LocalAuthentication prompt for validation of an enrolled fingerprint.
-
Initializes a new
TouchIDChallenge
mechanism.Declaration
Swift
required public convenience init()
-
Initializes a new
TouchIDChallenge
mechanism.Declaration
Swift
required public init(messagePrompt: String)
Parameters
messagePrompt
The message to display in the alert when prompted.
-
The name of the mechanism.
Declaration
Swift
public var name: String { get }
-
The description of the mechanism.
Declaration
Swift
public var description: String { get }
-
The identifier of the mechanism.
Remark
The identifier value is: urn:ibm:security:authentication:asf:mechanism:mobile_user_approval:fingerprint.Declaration
Swift
public var identifier: String { get }
-
The postback URI of the mechanism.
Remark
This value is set in the parse method.Declaration
Swift
public var postbackUri: String
-
The state represents the unique identifier of the machanism request.
Remark
This value is set in the parse method.Declaration
Swift
public var state: String
-
The message to display in the alert when prompted.
Declaration
Swift
public fileprivate(set) var messagePrompt: String
-
An array of
String
representing names of key handles.Declaration
Swift
public fileprivate(set) var keyHandles: [String]
-
The text representing the server challenge which requires signing.
Declaration
Swift
public fileprivate(set) var challengeText: String
-
The type of the enrollment challenge.
Declaration
Swift
public var type: String { get }
-
The type’s identifier, used to access the private key in the keychain. Only one challenge of this type can be enrolled, so there’s no overlap.
Declaration
Swift
public var keyName: String
-
The dictionary represeting the data that will be returned in the
TouchIDChallenge.launchUI
function.Remark
The default is to return the challenge unsigned.Declaration
Swift
public var challengeData: [String : Any]
-
Initializes a new challenge mechanism.
Throws
IBMMobileKitError.invalidDataFromServerDeclaration
Swift
public func parse(_ data: [String : Any]) throws -> TouchIDChallenge
Parameters
data
A data object containing JSON data.
Return Value
The instance of
TouchIDChallenge
. -
This method launches the Apple Touch ID dialog for LocalAuthentication.
Declaration
Swift
public func launchUI(_ viewController: UIViewController, completion: @escaping (_ data: [String: Any], _ error: Error?) -> Void)
Parameters
viewController
The view controller that is presented by this view controller, or one of its ancestors in the view controller hierarchy.
completion
The data to verify represented as an dictionary of String:Any and
Error
object to identify an error. -
This method launches the Apple Touch ID dialog for LocalAuthentication.
Declaration
Swift
public func launchUI(_ completion: @escaping (_ data: [String:Any], _ error: Error?) -> Void)
Parameters
completion
The data to verify represented as an dictionary of String:Any and
Error
object to identify an error.