AuthenticateRequest
public struct AuthenticateRequest : HTTPRequest
Authenticate the user with a Nanoleaf device.
A user is authorized if they can demonstrate physical access to the device. This is achieved by holding the power button down for 5-7 seconds until the LED starts flashing in a pattern.
Once the LED starts flashing, execute this request within 30 seconds.
-
Declaration
Swift
public typealias ResponseObject = Auth -
Declaration
Swift
public typealias ErrorObject = APIError -
Declaration
Swift
public let baseURL: URL -
Declaration
Swift
public var method: HTTPMethod { get } -
Declaration
Swift
public var path: String { get } -
Declaration
Swift
public var isAuthenticated: Bool { get } -
Declaration
Swift
public var body: Data?
-
Initialize a new instance.
Declaration
Swift
public init(url: URL)Parameters
baseURLThe device’s base URL.
AuthenticateRequest Structure Reference