HAConnectionConfiguration

public struct HAConnectionConfiguration

Configuration of the connection

  • Create a new configuration

    Declaration

    Swift

    public init(
        connectionInfo: @escaping () -> HAConnectionInfo?,
        fetchAuthToken: @escaping (@escaping (Result<String, Error>) -> Void) -> Void
    )

    Parameters

    connectionInfo

    Block which provides the connection info on demand

    fetchAuthToken

    Block which invokes a closure asynchronously to provide authentication access tokens

  • The connection info provider block

    Declaration

    Swift

    public var connectionInfo: () -> HAConnectionInfo?
  • The auth token provider block

    Declaration

    Swift

    public var fetchAuthToken: (_ completion: @escaping (Result<String, Error>) -> Void) -> Void