STRUCT

WebAuthnAuthenticationClientOperationStep

Contents

public struct WebAuthnAuthenticationClientOperationStep: ClientOperationStep, Equatable

A step that instructs a client that it should use the device's platform Authentication Services API to perform a User Authentication Assertion WebAuthn flow

The client application should invoke formattedParametersForAssertion method to build the request parameters, which can then be used with continueAction to proceed with the flow. Fallback actions are provided to assist on fallback if an error happens.

For more information, refer to the HAAPI Data Model documentation.

Properties

actionModel

public let actionModel: WebAuthnAuthenticationClientOperationActionModel

the WebAuthn client operation action model that contains the necessary details for the client to use the device's platform Authentication Services.

metadata

public let metadata: Metadata?

type

public let type: RepresentationType

actions

public let actions: [Action]

An array of Action that contains possible actions a user or the client may choose to take to continue the flow.

links

public let links: [Link]

messages

public let messages: [UserMessage]

properties

public let properties: Properties?

continueAction

public let continueAction: FormAction

Returns the form action that has to be submitted alongside the result of [buildParameters] after receiving the callback from the authenticator interaction.

fallbackActions

public var fallbackActions: [Action]

Returns the actions that should be triggered when WebAuthnhandling fails or is impossible to use with the native APIs.

Methods

init(from:)

public init(from decoder: Decoder) throws

Parameters

Name Description
decoder The decoder to read data from.

encode(to:)

public func encode(to encoder: Encoder) throws

Parameters

Name Description
encoder The encoder to write data to.

==(::)

public static func == (lhs: WebAuthnAuthenticationClientOperationStep,
                       rhs: WebAuthnAuthenticationClientOperationStep) -> Bool

Parameters

Name Description
lhs A value to compare.
rhs Another value to compare.

formattedParametersForAssertion(rawAuthenticatorData:rawClientDataJSON:signature:credentialID:credentialParamType:)

public func formattedParametersForAssertion(
    rawAuthenticatorData: Data,
    rawClientDataJSON: Data,
    signature: Data,
    credentialID: Data,
    credentialParamType: String = "public-key"
) -> [String: Any]

Builds the form parameters necessary to submit a WebAuthn Assertion request.

Parameters

Name Description
rawAuthenticatorData the attestation object’s data provided by the device’s platform Authorization Controller ASAuthorization.credential response.
rawClientDataJSON the clientDataJSON’s data provided by the device’s platform Authorization Controller ASAuthorization.credential response.
signature the signature’s data provided by the device’s platform Authorization Controller ASAuthorization.credential response.
credentialID the credentialID’s data provided by the device’s platform Authorization Controller ASAuthorization.credential response.
credentialParamType the credential type used to setup the authorization assertion request. Defaults to “public-key”.