[][src]Struct yup_oauth2::DeviceFlow

pub struct DeviceFlow<FD, C> { /* fields omitted */ }

Implements the Oauth2 Device Flow It operates in two steps:

  • obtain a code to show to the user
  • (repeatedly) poll for the user to authenticate your application

Methods

impl<FD, C> DeviceFlow<FD, C> where
    C: Connect + Sync + 'static,
    C::Transport: 'static,
    C::Future: 'static,
    FD: FlowDelegate + Clone + Send + 'static, 
[src]

pub fn new<S: 'static + AsRef<str>>(
    client: Client<C, Body>,
    secret: ApplicationSecret,
    fd: FD,
    device_code_url: Option<S>
) -> DeviceFlow<FD, C>
[src]

pub fn set_wait_duration(&mut self, wait: Duration)[src]

Set the time to wait for the user to authorize us. The default is 120 seconds.

pub fn retrieve_device_token<'a>(
    &mut self,
    scopes: Vec<String>
) -> Box<dyn Future<Item = Token, Error = RequestError> + Send>
[src]

Essentially what GetToken::token does: Retrieve a token for the given scopes without caching.

Trait Implementations

impl<FD: FlowDelegate + Clone + Send + 'static, C: Connect + Sync + 'static> GetToken for DeviceFlow<FD, C>[src]

Auto Trait Implementations

impl<FD, C> Sync for DeviceFlow<FD, C> where
    C: Send + Sync,
    FD: Sync

impl<FD, C> Send for DeviceFlow<FD, C> where
    C: Send + Sync,
    FD: Send

impl<FD, C> Unpin for DeviceFlow<FD, C> where
    FD: Unpin

impl<FD, C> !RefUnwindSafe for DeviceFlow<FD, C>

impl<FD, C> !UnwindSafe for DeviceFlow<FD, C>

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T