DeviceClient

@available(iOS 13.0.0, *)
public class DeviceClient

Implementation of DeviceRepository for managing user devices

  • Initializes the DeviceClient with the given options and SSO token block.

    Declaration

    Swift

    public init(options: FROptions? = FRAuth.shared?.options,
                ssoTokenBlock: @escaping () async throws -> Token = { ssoToken() })

    Parameters

    options

    The FROptionsserver configuration

    ssoTokenBlock

    The closure to retrieve the SSO token.

  • Provides access to Oath devices, supporting deletions.

    Declaration

    Swift

    public lazy var oath: any ImmutableDevice<OathDevice> { get set }
  • Provides access to Push devices, supporting deletions.

    Declaration

    Swift

    public lazy var push: any ImmutableDevice<PushDevice> { get set }
  • Provides access to Bound devices, supporting updates and deletions.

    Declaration

    Swift

    public lazy var bound: any MutableDevice<BoundDevice> { get set }
  • Provides access to Profile devices, supporting updates and deletions.

    Declaration

    Swift

    public lazy var profile: any MutableDevice<ProfileDevice> { get set }
  • Provides access to WebAuthn devices, supporting updates and deletions.

    Declaration

    Swift

    public lazy var webAuthn: any MutableDevice<WebAuthnDevice> { get set }
  • Retrieves the current SSO token.

    Declaration

    Swift

    public static func ssoToken() -> Token

    Return Value

    the current Token or an empty token if no session is available.