ENUM

HaapiModel.StepFactory

Contents

enum StepFactory

Provides functionality to build instances of Step HaapiRepresentation.

Methods

authenticatorOption(title:type:action:)

public static func authenticatorOption(title: Message,
                                       type: String?,
                                       action: FormAction) -> AuthenticatorSelectorStep.AuthenticatorOption

Creates an instance of AuthenticatorSelectorStep.AuthenticatorOption model.

Parameters

Name Description
title The title of the represented AuthenticatorOption.
type The type of the authenticator.
action The FormAction to be used to select the current option.

authenticatorSelector(title:authenticators:metadata:actions:messages:links:properties:)

public static func authenticatorSelector(title: Message, // swiftlint:disable:this function_parameter_count
                                         authenticators: [AuthenticatorSelectorStep.AuthenticatorOption],
                                         metadata: Metadata?,
                                         actions: [Action],
                                         messages: [UserMessage],
                                         links: [Link],
                                         properties: GenericProperties?) -> AuthenticatorSelectorStep

Creates an instance of AuthenticatorSelectorStep model.

Parameters

Name Description
title The title of the represented Step.
authenticators An array of AuthenticatorOption instances to choose from.
metadata Additional information about the Step.
actions An array of actions that can be used to move the flow forward.
messages An array of messages to be displayed to the user.
links An array of Link instances that can be used to choose an alternate path for the flow.
properties The additional properties JSON representation.

interactiveForm(actions:type:metadata:messages:links:properties:)

public static func interactiveForm(actions: [FormAction],
                                   type: RepresentationType,
                                   metadata: Metadata?,
                                   messages: [UserMessage],
                                   links: [Link],
                                   properties: GenericProperties?) -> InteractiveFormStep

Creates an instance of InteractiveFormStep model.

Parameters

Name Description
actions An array of FormAction instances that can be used to move the flow forward.
type The type of the modelled Step.
metadata Additional information about the Step.
messages An array of messages to be displayed to the user.
links An array of Link instances that can be used to choose an alternate path for the flow.
properties The additional properties JSON representation.

redirection(redirectAction:metadata:actions:properties:)

public static func redirection(redirectAction: FormAction,
                               metadata: Metadata?,
                               actions: [Action],
                               properties: GenericProperties?) -> RedirectionStep

Creates an instance of RedirectionStep model.

Parameters

Name Description
redirectAction The FormAction that maps the redirect action kind.
actions An array of actions that can be used to move the flow forward.
metadata Additional information about the Step.
properties The additional properties JSON representation.

polling(mainAction:cancelAction:metadata:actions:messages:links:properties:)

public static func polling(mainAction: FormAction, // swiftlint:disable:this function_parameter_count
                           cancelAction: FormAction?,
                           metadata: Metadata?,
                           actions: [Action],
                           messages: [UserMessage],
                           links: [Link],
                           properties: PollingProperties) -> PollingStep

Creates an instance of PollingStep model.

Parameters

Name Description
mainAction The FormAction that maps the poll action kind.
cancelAction The FormAction that maps the cancel action kind.
metadata Additional information about the Step.
actions An array of actions that can be used to move the flow forward.
messages An array of messages to be displayed to the user.
links An array of Link instances that can be used to choose an alternate path for the flow.
properties The additional PollingProperties JSON representation.

oAuthAuthorization(metadata:messages:links:properties:)

public static func oAuthAuthorization(metadata: Metadata?,
                                      messages: [UserMessage],
                                      links: [Link],
                                      properties: OAuthAuthorizationResponseProperties) -> OAuthAuthorizationResponseStep // swiftlint:disable:this line_length

Creates an instance of OAuthAuthorizationResponseStep model.

Parameters

Name Description
metadata Additional information about the Step.
messages An array of messages to be displayed to the user.
links An array of Link instances that can be used to choose an alternate path for the flow.
properties The additional OAuthAuthorizationResponseProperties JSON representation.

continueSame(metadata:messages:properties:)

public static func continueSame(metadata: Metadata?,
                                messages: [UserMessage],
                                properties: GenericProperties?) -> ContinueSameStep

Creates an instance of ContinueSameStep model.

Parameters

Name Description
metadata Additional information about the Step.
messages An array of messages to be displayed to the user.
properties The additional properties JSON representation.

userConsent(metadata:actions:messages:links:properties:)

public static func userConsent(metadata: Metadata?,
                               actions: [Action],
                               messages: [UserMessage],
                               links: [Link],
                               properties: GenericProperties?) -> UserConsentStep

Creates an instance of UserConsentStep model.

Parameters

Name Description
metadata Additional information about the Step.
actions An array of actions that can be used to move the flow forward.
messages An array of messages to be displayed to the user.
links An array of Link instances that can be used to choose an alternate path for the flow.
properties The additional properties JSON representation.

externalBrowserClientOperation(actionModel:metadata:type:actions:properties:)

public static func externalBrowserClientOperation(actionModel: ExternalBrowserClientOperationActionModel,
                                                  metadata: Metadata?,
                                                  type: RepresentationType,
                                                  actions: [Action],
                                                  properties: GenericProperties?) -> ExternalBrowserClientOperationStep // swiftlint:disable:this line_length

Creates an instance of ExternalBrowserClientOperationStep model.

Parameters

Name Description
actionModel The ExternalBrowserClientOperationActionModel model instance.
metadata Additional information about the Step.
type The RepresentatioType value for the step.
actions An array of actions that can be used to move the flow forward.
properties The additional properties JSON representation.

bankIdClientOperation(activationLink:actionModel:metadata:type:actions:messages:links:properties:)

public static func bankIdClientOperation(activationLink: Link?, // swiftlint:disable:this function_parameter_count line_length
                                         actionModel: BankIdClientOperationActionModel,
                                         metadata: Metadata?,
                                         type: RepresentationType,
                                         actions: [Action],
                                         messages: [UserMessage],
                                         links: [Link],
                                         properties: GenericProperties?) -> BankIdClientOperationStep

Creates an instance of BankIdClientOperationStep model.

Parameters

Name Description
activationLink The activation link for BakId. It represents a QRCode image.
actionModel The BankIdClientOperationActionModel model instance.
metadata Additional information about the Step.
type The RepresentatioType value for the step.
actions An array of actions that can be used to move the flow forward.
messages An array of messages to be displayed to the user.
links An array of Link instances that can be used to choose an alternate path for the flow.
properties The additional properties JSON representation.

encapClientOperation(actionModel:metadata:type:actions:messages:links:properties:)

public static func encapClientOperation(actionModel: EncapAutoActivationClientOperationActionModel, // swiftlint:disable:this function_parameter_count line_length
                                        metadata: Metadata?,
                                        type: RepresentationType,
                                        actions: [Action],
                                        messages: [UserMessage],
                                        links: [Link],
                                        properties: GenericProperties?) -> EncapClientOperationStep

Creates an instance of EncapClientOperationStep model.

Parameters

Name Description
actionModel The EncapAutoActivationClientOperationActionModel model instance.
metadata Additional information about the Step.
type The RepresentatioType value for the step.
actions An array of actions that can be used to move the flow forward.
messages An array of messages to be displayed to the user.
links An array of Link instances that can be used to choose an alternate path for the flow.
properties The additional properties JSON representation.

webauthnRegistrationClientOperation(actionModel:metadata:type:actions:messages:links:properties:)

public static func webauthnRegistrationClientOperation(actionModel: WebAuthnRegistrationClientOperationActionModel, // swiftlint:disable:this function_parameter_count line_length
                                                       metadata: Metadata?,
                                                       type: RepresentationType,
                                                       actions: [Action],
                                                       messages: [UserMessage],
                                                       links: [Link],
                                                       properties: GenericProperties?) throws -> WebAuthnRegistrationClientOperationStep // swiftlint:disable:this line_length

Creates an instance of WebAuthnRegistrationClientOperationStep model.

Parameters

Name Description
actionModel The WebAuthnRegistrationClientOperationActionModel model instance.
metadata Additional information about the Step.
type The RepresentatioType value for the step.
actions An array of actions that can be used to move the flow forward.
messages An array of messages to be displayed to the user.
links An array of Link instances that can be used to choose an alternate path for the flow.
properties The additional properties JSON representation.

webAuthnAuthenticationClientOperation(actionModel:metadata:type:actions:messages:links:properties:)

public static func webAuthnAuthenticationClientOperation(actionModel: WebAuthnAuthenticationClientOperationActionModel, // swiftlint:disable:this function_parameter_count line_length
                                                         metadata: Metadata?,
                                                         type: RepresentationType,
                                                         actions: [Action],
                                                         messages: [UserMessage],
                                                         links: [Link],
                                                         properties: GenericProperties?) throws -> WebAuthnAuthenticationClientOperationStep // swiftlint:disable:this line_length

Creates an instance of WebAuthnAuthenticationClientOperationStep model.

Parameters

Name Description
actionModel The WebAuthnAuthenticationClientOperationActionModel model instance.
metadata Additional information about the Step.
type The RepresentatioType value for the step.
actions An array of actions that can be used to move the flow forward.
messages An array of messages to be displayed to the user.
links An array of Link instances that can be used to choose an alternate path for the flow.
properties The additional properties JSON representation.

genericClientOperation(actionModel:metadata:type:actions:messages:links:properties:)

public static func genericClientOperation(actionModel: GenericClientOperationActionModel, // swiftlint:disable:this function_parameter_count line_length
                                          metadata: Metadata?,
                                          type: RepresentationType,
                                          actions: [Action],
                                          messages: [UserMessage],
                                          links: [Link],
                                          properties: GenericProperties?) -> GenericClientOperationStep

Creates an instance of GenericClientOperationStep model.

Parameters

Name Description
actionModel The GenericClientOperationActionModel model instance.
metadata Additional information about the Step.
type The RepresentatioType value for the step.
actions An array of actions that can be used to move the flow forward.
messages An array of messages to be displayed to the user.
links An array of Link instances that can be used to choose an alternate path for the flow.
properties The additional properties JSON representation.

genericRepresentation(type:metadata:actions:messages:links:properties:)

public static func genericRepresentation(type: RepresentationType,
                                         metadata: Metadata?,
                                         actions: [Action],
                                         messages: [UserMessage],
                                         links: [Link],
                                         properties: Properties?) -> GenericRepresentationStep

Creates an instance of GenericRepresentationStep model.

Parameters

Name Description
type The RepresentatioType value for the step.
metadata Additional information about the Step.
actions An array of actions that can be used to move the flow forward.
messages An array of messages to be displayed to the user.
links An array of Link instances that can be used to choose an alternate path for the flow.
properties The additional properties JSON representation.