Struct openid_client::client::device_flow_handle::DeviceFlowHandle
source · pub struct DeviceFlowHandle { /* private fields */ }Expand description
DeviceFlowHandle
Handle used to poll 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(
&mut self
) -> Result<DeviceFlowGrantResponse, OidcClientError>
pub async fn grant_async( &mut self ) -> Result<DeviceFlowGrantResponse, OidcClientError>
Performs grant request at the token_endpoint
Trait Implementations§
Auto Trait Implementations§
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