[−][src]Struct yup_oauth2::InstalledFlow
InstalledFlow provides tokens for services that follow the "Installed" OAuth flow. (See
https://www.oauth.com/oauth2-servers/authorization/,
https://developers.google.com/identity/protocols/OAuth2InstalledApp). You should use it wrapped
inside an Authenticator
to benefit from refreshing tokens and caching previously obtained
authorization.
Methods
impl<'c, FD: 'static + FlowDelegate + Clone + Send, C: 'c + Connect> InstalledFlow<FD, C>
[src]
pub fn new(
client: Client<C, Body>,
fd: FD,
secret: ApplicationSecret,
method: InstalledFlowReturnMethod
) -> InstalledFlow<FD, C>
[src]
client: Client<C, Body>,
fd: FD,
secret: ApplicationSecret,
method: InstalledFlowReturnMethod
) -> InstalledFlow<FD, C>
Starts a new Installed App auth flow. If HTTPRedirect is chosen as method and the server can't be started, the flow falls back to Interactive.
pub fn obtain_token<'a>(
&mut self,
scopes: Vec<String>
) -> impl 'a + Future<Item = Token, Error = RequestError> + Send
[src]
&mut self,
scopes: Vec<String>
) -> impl 'a + Future<Item = Token, Error = RequestError> + Send
Handles the token request flow; it consists of the following steps: . Obtain a authorization code with user cooperation or internal redirect. . Obtain a token and refresh token using that code. . Return that token
It's recommended not to use the DefaultFlowDelegate, but a specialized one.
Trait Implementations
impl<FD: FlowDelegate + 'static + Send + Clone, C: Connect + 'static> GetToken for InstalledFlow<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 InstalledFlow<FD, C> where
FD: Sync,
FD: Sync,
impl<FD, C> Send for InstalledFlow<FD, C> where
FD: Send,
FD: Send,
impl<FD, C> Unpin for InstalledFlow<FD, C> where
FD: Unpin,
FD: Unpin,
impl<FD, C> !RefUnwindSafe for InstalledFlow<FD, C>
impl<FD, C> !UnwindSafe for InstalledFlow<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,