pub struct DeviceAuthorizationResponse {
pub device_code: String,
pub expires_in: i64,
pub interval: i64,
pub user_code: String,
pub verification_uri: String,
pub verification_uri_complete: String,
}Expand description
Response from the device authorization endpoint per RFC 8628. Contains codes and URIs for the device flow.
JSON schema
{
"title": "DeviceAuthorizationResponse",
"description": "Response from the device authorization endpoint per RFC
8628. Contains codes and URIs for the device flow.",
"examples": [
{
"device_code":
"a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2",
"expires_in": 600,
"interval": 5,
"user_code": "BCDFG-HJKMN",
"verification_uri": "https://auth.example.com/device",
"verification_uri_complete": "https://auth.example.com/device?user_code=BCDFG-HJKMN&app_id=app123"
}
],
"type": "object",
"required": [
"device_code",
"expires_in",
"interval",
"user_code",
"verification_uri",
"verification_uri_complete"
],
"properties": {
"device_code": {
"description": "A long-lived code used by the device to poll for
authorization status.",
"type": "string"
},
"expires_in": {
"description": "The lifetime in seconds of the device_code and
user_code.",
"type": "integer"
},
"interval": {
"description": "The minimum number of seconds the device should
wait between polling requests.",
"type": "integer"
},
"user_code": {
"description": "A short code displayed to the user, who enters it
at the verification URI to authorize the device.",
"type": "string"
},
"verification_uri": {
"description": "The URI where the user navigates to enter the
user_code.",
"type": "string",
"format": "uri"
},
"verification_uri_complete": {
"description": "The verification URI with the user_code pre-filled
as a query parameter.",
"type": "string",
"format": "uri"
}
},
"x-stainless-model": "oauth.device_authorization_response"
}Fields§
§device_code: StringA long-lived code used by the device to poll for authorization status.
expires_in: i64The lifetime in seconds of the device_code and user_code.
interval: i64The minimum number of seconds the device should wait between polling requests.
user_code: StringA short code displayed to the user, who enters it at the verification URI to authorize the device.
verification_uri: StringThe URI where the user navigates to enter the user_code.
verification_uri_complete: StringThe verification URI with the user_code pre-filled as a query parameter.
Trait Implementations§
Source§impl Clone for DeviceAuthorizationResponse
impl Clone for DeviceAuthorizationResponse
Source§fn clone(&self) -> DeviceAuthorizationResponse
fn clone(&self) -> DeviceAuthorizationResponse
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DeviceAuthorizationResponse
impl Debug for DeviceAuthorizationResponse
Source§impl<'de> Deserialize<'de> for DeviceAuthorizationResponse
impl<'de> Deserialize<'de> for DeviceAuthorizationResponse
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&DeviceAuthorizationResponse> for DeviceAuthorizationResponse
impl From<&DeviceAuthorizationResponse> for DeviceAuthorizationResponse
Source§fn from(value: &DeviceAuthorizationResponse) -> Self
fn from(value: &DeviceAuthorizationResponse) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for DeviceAuthorizationResponse
impl RefUnwindSafe for DeviceAuthorizationResponse
impl Send for DeviceAuthorizationResponse
impl Sync for DeviceAuthorizationResponse
impl Unpin for DeviceAuthorizationResponse
impl UnsafeUnpin for DeviceAuthorizationResponse
impl UnwindSafe for DeviceAuthorizationResponse
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more