pub struct DeviceAuthorizationResponse {
pub device_code: String,
pub user_code: String,
pub verification_uri: Url,
pub verification_uri_complete: Option<Url>,
pub expires_in: TimeDelta,
pub interval: Option<TimeDelta>,
}
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: TimeDelta
The lifetime of the device_code
and user_code
.
interval: Option<TimeDelta>
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) -> TimeDelta
pub fn interval(&self) -> TimeDelta
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<DeviceAuthorizationResponse, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<DeviceAuthorizationResponse, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
source§impl PartialEq for DeviceAuthorizationResponse
impl PartialEq for DeviceAuthorizationResponse
source§fn eq(&self, other: &DeviceAuthorizationResponse) -> bool
fn eq(&self, other: &DeviceAuthorizationResponse) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for DeviceAuthorizationResponse
impl Serialize for DeviceAuthorizationResponse
source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default 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> FutureExt for T
impl<T> FutureExt for T
source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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