ChallengeProtocol

public protocol ChallengeProtocol

The protocol to which multi-factor authentication challenge mechanisms are derived from.

  • Initializes a new ChallengeProtocol.

    Declaration

    Swift

    init()
  • Initializes a new ChallengeProtocol with a message.

    Declaration

    Swift

    init(messagePrompt: String)

    Parameters

    messagePrompt

    The message to display.

  • The description of the mechanism.

    Declaration

    Swift

    var description: String { get }
  • The identifier of the mechanism. For example: urn:ibm:security:authentication:asf:mechanism:face

    Declaration

    Swift

    var identifier: String { get }
  • The message to display in the alert when prompted.

    Declaration

    Swift

    var messagePrompt: String { get }
  • The postback URI of the mechanism.

    Remark

    This value is set in the parse method.

    Declaration

    Swift

    var postbackUri: String { get set }
  • The state represents the unique identifier of the mechanism request.

    Remark

    This value is set in the parse method.

    Declaration

    Swift

    var state: String { get set }
  • Initializes a new challenge mechanism.

    Throws

    IBMMobileKitError.invalidDataFromServer

    Declaration

    Swift

    func parse(_ data: [String : Any]) throws -> Self

    Parameters

    data

    A data object containing JSON data.

    Return Value

    The instance of ChallengeProtocol.

  • This method launches a user interface for challenge data input.

    Declaration

    Swift

    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.

  • This method launches a user interface for challenge data input.

    Declaration

    Swift

    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.