pub struct DeviceAuthorizationResponse {
pub device_code: String,
pub user_code: String,
pub verification_uri: Url,
pub verification_uri_complete: Option<Url>,
pub expires_in: Duration,
pub interval: Option<Duration>,
}
Expand description
A successful response from the Device Authorization Endpoint.
Fields§
§device_code: String
The device verification code.
user_code: String
The end-user verification code.
verification_uri: Url
The end-user verification URI on the authorization server.
The URI should be short and easy to remember as end users will be asked to manually type it into their user agent.
verification_uri_complete: Option<Url>
A verification URI that includes the user_code
(or other information
with the same function as the user_code
), which is designed for
non-textual transmission.
expires_in: Duration
The lifetime of the device_code
and user_code
.
interval: Option<Duration>
The minimum amount of time in seconds that the client should wait between polling requests to the token endpoint.
Defaults to DEFAULT_DEVICE_AUTHORIZATION_INTERVAL
.
Implementations§
source§impl DeviceAuthorizationResponse
impl DeviceAuthorizationResponse
sourcepub fn interval(&self) -> Duration
pub fn interval(&self) -> Duration
The minimum amount of time in seconds that the client should wait between polling requests to the token endpoint.
Defaults to DEFAULT_DEVICE_AUTHORIZATION_INTERVAL
.
Trait Implementations§
source§impl Clone for DeviceAuthorizationResponse
impl Clone for DeviceAuthorizationResponse
source§fn clone(&self) -> DeviceAuthorizationResponse
fn clone(&self) -> DeviceAuthorizationResponse
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
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>,
impl Eq for DeviceAuthorizationResponse
impl StructuralPartialEq for DeviceAuthorizationResponse
Auto Trait Implementations§
impl Freeze for DeviceAuthorizationResponse
impl RefUnwindSafe for DeviceAuthorizationResponse
impl Send for DeviceAuthorizationResponse
impl Sync for DeviceAuthorizationResponse
impl Unpin 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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more