archastro.platform.types.device
1# Copyright (c) 2026 ArchAstro Inc. Licensed under the MIT License. 2# This file is auto-generated by @archastro/sdk-generator. Do not edit. 3# Content hash: fae476f561c9 4 5from datetime import datetime 6 7from pydantic import BaseModel, Field 8 9 10class DeviceAuthorizationDetailsResponse(BaseModel): 11 """ 12 User-visible details for a pending OAuth 2.0 device authorization. 13 """ 14 15 client_name: str = Field(..., description="Name of the client requesting authorization.") 16 expires_at: datetime = Field( 17 ..., description="Expiration time for the pending device authorization." 18 ) 19 scopes: list[str] = Field(..., description="Scopes the client is requesting.") 20 21 22class DeviceAuthorizationResponse(BaseModel): 23 """ 24 The initial response from an OAuth 2.0 Device Authorization Grant request, containing the codes and URIs needed to complete device authentication. 25 """ 26 27 device_code: str = Field( 28 ..., 29 description="Opaque code identifying this device authorization session. Pass this value when polling the token endpoint; do not display it to the user.", 30 ) 31 expires_in: int = Field( 32 ..., 33 description="Number of seconds until the `device_code` and `user_code` expire. After expiry the user must restart the authorization flow.", 34 ) 35 interval: int = Field( 36 ..., 37 description="Minimum number of seconds to wait between polling attempts on the token endpoint. Polling more frequently will result in a `slow_down` error.", 38 ) 39 user_code: str = Field( 40 ..., 41 description="Short alphanumeric code the user must enter at `verification_uri` to authorize the device.", 42 ) 43 verification_uri: str = Field( 44 ..., 45 description="URL the user visits to enter the `user_code` and approve the authorization request.", 46 ) 47 verification_uri_complete: str = Field( 48 ..., 49 description="Full verification URL with the `user_code` pre-filled as a query parameter. Display this as a QR code or deep link to reduce manual entry.", 50 ) 51 52 53class DeviceAuthorizationStatusResponse(BaseModel): 54 """ 55 The result of a completed OAuth 2.0 Device Authorization flow, indicating whether the user approved or denied the device's access request. 56 """ 57 58 status: str = Field( 59 ..., 60 description='Outcome of the device authorization request. One of `"approved"` (the user granted access) or `"denied"` (the user rejected or cancelled the request).', 61 )
11class DeviceAuthorizationDetailsResponse(BaseModel): 12 """ 13 User-visible details for a pending OAuth 2.0 device authorization. 14 """ 15 16 client_name: str = Field(..., description="Name of the client requesting authorization.") 17 expires_at: datetime = Field( 18 ..., description="Expiration time for the pending device authorization." 19 ) 20 scopes: list[str] = Field(..., description="Scopes the client is requesting.")
User-visible details for a pending OAuth 2.0 device authorization.
23class DeviceAuthorizationResponse(BaseModel): 24 """ 25 The initial response from an OAuth 2.0 Device Authorization Grant request, containing the codes and URIs needed to complete device authentication. 26 """ 27 28 device_code: str = Field( 29 ..., 30 description="Opaque code identifying this device authorization session. Pass this value when polling the token endpoint; do not display it to the user.", 31 ) 32 expires_in: int = Field( 33 ..., 34 description="Number of seconds until the `device_code` and `user_code` expire. After expiry the user must restart the authorization flow.", 35 ) 36 interval: int = Field( 37 ..., 38 description="Minimum number of seconds to wait between polling attempts on the token endpoint. Polling more frequently will result in a `slow_down` error.", 39 ) 40 user_code: str = Field( 41 ..., 42 description="Short alphanumeric code the user must enter at `verification_uri` to authorize the device.", 43 ) 44 verification_uri: str = Field( 45 ..., 46 description="URL the user visits to enter the `user_code` and approve the authorization request.", 47 ) 48 verification_uri_complete: str = Field( 49 ..., 50 description="Full verification URL with the `user_code` pre-filled as a query parameter. Display this as a QR code or deep link to reduce manual entry.", 51 )
The initial response from an OAuth 2.0 Device Authorization Grant request, containing the codes and URIs needed to complete device authentication.
Opaque code identifying this device authorization session. Pass this value when polling the token endpoint; do not display it to the user.
Number of seconds until the device_code and user_code expire. After expiry the user must restart the authorization flow.
Minimum number of seconds to wait between polling attempts on the token endpoint. Polling more frequently will result in a slow_down error.
Short alphanumeric code the user must enter at verification_uri to authorize the device.
URL the user visits to enter the user_code and approve the authorization request.
Full verification URL with the user_code pre-filled as a query parameter. Display this as a QR code or deep link to reduce manual entry.
54class DeviceAuthorizationStatusResponse(BaseModel): 55 """ 56 The result of a completed OAuth 2.0 Device Authorization flow, indicating whether the user approved or denied the device's access request. 57 """ 58 59 status: str = Field( 60 ..., 61 description='Outcome of the device authorization request. One of `"approved"` (the user granted access) or `"denied"` (the user rejected or cancelled the request).', 62 )
The result of a completed OAuth 2.0 Device Authorization flow, indicating whether the user approved or denied the device's access request.