[−][src]Struct yup_oauth2::DeviceFlow
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]
C: Connect + Sync + 'static,
C::Transport: 'static,
C::Future: 'static,
FD: FlowDelegate + Clone + Send + 'static,
pub fn new<S: 'static + AsRef<str>>(
client: Client<C, Body>,
secret: ApplicationSecret,
fd: FD,
device_code_url: Option<S>
) -> DeviceFlow<FD, C>
[src]
client: Client<C, Body>,
secret: ApplicationSecret,
fd: FD,
device_code_url: Option<S>
) -> DeviceFlow<FD, C>
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]
&mut self,
scopes: Vec<String>
) -> Box<dyn Future<Item = Token, Error = RequestError> + Send>
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]
fn token<I, T>(
&mut self,
scopes: I
) -> Box<dyn Future<Item = Token, Error = RequestError> + Send> where
T: Into<String>,
I: IntoIterator<Item = T>,
[src]
&mut self,
scopes: I
) -> Box<dyn Future<Item = Token, Error = RequestError> + Send> where
T: Into<String>,
I: IntoIterator<Item = T>,
fn api_key(&mut self) -> Option<String>
[src]
fn application_secret(&self) -> ApplicationSecret
[src]
Auto Trait Implementations
impl<FD, C> Sync for DeviceFlow<FD, C> where
C: Send + Sync,
FD: Sync,
C: Send + Sync,
FD: Sync,
impl<FD, C> Send for DeviceFlow<FD, C> where
C: Send + Sync,
FD: Send,
C: Send + Sync,
FD: Send,
impl<FD, C> Unpin for DeviceFlow<FD, C> where
FD: Unpin,
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]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,