Struct openid_client::client::device_flow_handle::DeviceFlowHandle
source · pub struct DeviceFlowHandle { /* private fields */ }Expand description
§DeviceFlowHandle
Handle used for Device Grant
Implementations§
source§impl DeviceFlowHandle
impl DeviceFlowHandle
sourcepub fn new(
client: Client,
response: DeviceAuthorizationResponse,
extras: Option<DeviceAuthorizationExtras>,
max_age: Option<u64>,
) -> Self
pub fn new( client: Client, response: DeviceAuthorizationResponse, extras: Option<DeviceAuthorizationExtras>, max_age: Option<u64>, ) -> Self
Creates a new Device Flow Handle
client - See Client
response - DeviceAuthorizationResponse from the Device Authorization Endpoint
extras - See DeviceAuthorizationExtras
max_age - Maximum allowed age of the token
sourcepub fn expires_at(&self) -> i64
pub fn expires_at(&self) -> i64
Gets the timestamp in seconds of when the device code expires
sourcepub fn expires_in(&self) -> i64
pub fn expires_in(&self) -> i64
Gets the seconds in which the device code expires
sourcepub fn increase_interval(&mut self, by: f64)
pub fn increase_interval(&mut self, by: f64)
Increase the interval by by seconds
sourcepub fn device_code(&self) -> &str
pub fn device_code(&self) -> &str
Gets the Device Code
sourcepub fn verification_uri(&self) -> &str
pub fn verification_uri(&self) -> &str
Gets verification uri
sourcepub fn verification_uri_complete(&self) -> Option<&String>
pub fn verification_uri_complete(&self) -> Option<&String>
Gets the complete verification uri
sourcepub async fn grant_async<T>(
&mut self,
http_client: &T,
) -> OidcReturnType<DeviceFlowGrantResponse>where
T: OidcHttpClient,
pub async fn grant_async<T>(
&mut self,
http_client: &T,
) -> OidcReturnType<DeviceFlowGrantResponse>where
T: OidcHttpClient,
§Device Flow Grant
Performs grant request at the token endpoint. This method will not poll itself. It is left to the implementor to create that logic.
See DeviceFlowGrantResponse for the possible responses that will be obtained from the grant.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DeviceFlowHandle
impl RefUnwindSafe for DeviceFlowHandle
impl Send for DeviceFlowHandle
impl Sync for DeviceFlowHandle
impl Unpin for DeviceFlowHandle
impl UnwindSafe for DeviceFlowHandle
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