DeviceBindingCallback

public class DeviceBindingCallback : AbstractCallback, @unchecked Sendable, JourneyAware, ContinueNodeAware

A Journey callback for handling device binding. This callback is received from the AIC authentication flow when a device needs to be bound to a user account.

  • The Journey object associated with the current authentication flow.

    Declaration

    Swift

    public var journey: Journey?
  • The ContinueNode object that can be used to continue the authentication flow.

    Declaration

    Swift

    public var continueNode: ContinueNode?
  • The user ID for the binding.

    Declaration

    Swift

    public var userId: String
  • The username for the binding.

    Declaration

    Swift

    public var userName: String
  • The challenge to be signed.

    Declaration

    Swift

    public var challenge: String
  • The type of authentication to be used.

    Declaration

    Swift

    public var deviceBindingAuthenticationType: DeviceBindingAuthenticationType
  • The title to be displayed in the UI.

    Declaration

    Swift

    public var title: String
  • The subtitle to be displayed in the UI.

    Declaration

    Swift

    public var subtitle: String
  • The description to be displayed in the UI.

    Declaration

    Swift

    public var description: String
  • The timeout for the operation.

    Declaration

    Swift

    public var timeout: Int
  • The attestation option.

    Declaration

    Swift

    public var attestation: Attestation
  • Initializes the callback with the given name and value. This method is called by the Journey framework to initialize the callback with the values from the server.

    Declaration

    Swift

    public override func initValue(name: String, value: Any)

    Parameters

    name

    The name of the value.

    value

    The value.

  • Sets the JWS on the callback. This method is called by the PingBinder after successfully signing the challenge.

    Declaration

    Swift

    public func setJws(_ jws: String)

    Parameters

    jws

    The JWS to set.

  • Sets the device ID on the callback. This method is called by the PingBinder after successfully binding the device.

    Declaration

    Swift

    public func setDeviceId(_ deviceId: String)

    Parameters

    deviceId

    The device ID to set.

  • Sets the device name on the callback. This method is called by the PingBinder after successfully binding the device.

    Declaration

    Swift

    public func setDeviceName(_ deviceName: String)

    Parameters

    deviceName

    The device name to set.

  • bind(config:) Asynchronous

    Binds a device to a user account. This method calls the PingBinder to perform the binding operation.

    Declaration

    Swift

    public func bind(config: (DeviceBindingConfig) -> Void = { _ in }) async -> Result<[String : Any], Error>

    Parameters

    config

    A closure to configure the DeviceBindingConfig.

    Return Value

    A Result containing the callback’s JSON representation or an Error.