oauth2::devicecode

Type Alias StandardDeviceAuthorizationResponse

Source
pub type StandardDeviceAuthorizationResponse = DeviceAuthorizationResponse<EmptyExtraDeviceAuthorizationFields>;
Expand description

Standard implementation of DeviceAuthorizationResponse which throws away extra received response fields.

Aliased Type§

struct StandardDeviceAuthorizationResponse { /* private fields */ }

Implementations

Source§

impl<EF> DeviceAuthorizationResponse<EF>

Source

pub fn device_code(&self) -> &DeviceCode

The device verification code.

Source

pub fn user_code(&self) -> &UserCode

The end-user verification code.

Source

pub fn verification_uri(&self) -> &EndUserVerificationUrl

The end-user verification URI on the authorization The URI should be short and easy to remember as end users will be asked to manually type it into their user agent.

Source

pub fn verification_uri_complete(&self) -> Option<&VerificationUriComplete>

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.

Source

pub fn expires_in(&self) -> Duration

The lifetime in seconds of the “device_code” and “user_code”.

Source

pub fn interval(&self) -> Duration

The minimum amount of time in seconds that the client SHOULD wait between polling requests to the token endpoint. If no value is provided, clients MUST use 5 as the default.

Source

pub fn extra_fields(&self) -> &EF

Any extra fields returned on the response.

Trait Implementations

Source§

impl<EF> Clone for DeviceAuthorizationResponse<EF>

Source§

fn clone(&self) -> DeviceAuthorizationResponse<EF>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<EF> Debug for DeviceAuthorizationResponse<EF>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de, EF> Deserialize<'de> for DeviceAuthorizationResponse<EF>

Source§

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<EF> Serialize for DeviceAuthorizationResponse<EF>

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more