DeviceAuthorizationResponse
public struct DeviceAuthorizationResponse : Decodable, Sendable
Represents the server response to a device authorization request (RFC 8628).
-
The device verification code.
Declaration
Swift
public let deviceCode: String -
The end-user verification code.
Declaration
Swift
public let userCode: String -
The end-user verification URI on the authorization server.
Declaration
Swift
public let verificationUri: String -
An optional verification URI that includes the
user_codefor non-textual transmission.Declaration
Swift
public let verificationUriComplete: String? -
The lifetime in seconds of the
deviceCodeanduserCode.Declaration
Swift
public let expiresIn: Int -
The minimum amount of time in seconds the client should wait between polling requests. Defaults to
5if absent from the server response.Declaration
Swift
public let interval: Int -
Decodes a
DeviceAuthorizationResponsefrom the standard RFC 8628 JSON representation, mapping snake-case JSON keys to camelCase properties.intervaldefaults to5seconds when omitted by the server.Declaration
Swift
public init(from decoder: Decoder) throws
View on GitHub