[−][src]Trait yup_oauth2::GetToken
A provider for authorization tokens, yielding tokens valid for a given scope.
The api_key()
method is an alternative in case there are no scopes or
if no user is involved.
Required methods
fn token<'b, I, T>(&mut self, scopes: I) -> Result<Token, Box<dyn Error>> where
T: AsRef<str> + Ord + 'b,
I: IntoIterator<Item = &'b T>,
T: AsRef<str> + Ord + 'b,
I: IntoIterator<Item = &'b T>,
fn api_key(&mut self) -> Option<String>
Implementors
impl<C: BorrowMut<Client>> GetToken for ServiceAccountAccess<C>
[src]
fn token<'b, I, T>(&mut self, scopes: I) -> Result<Token, Box<dyn Error>> where
T: AsRef<str> + Ord + 'b,
I: IntoIterator<Item = &'b T>,
[src]
T: AsRef<str> + Ord + 'b,
I: IntoIterator<Item = &'b T>,
fn api_key(&mut self) -> Option<String>
[src]
impl<D, S, C> GetToken for Authenticator<D, S, C> where
D: AuthenticatorDelegate,
S: TokenStorage,
C: BorrowMut<Client>,
[src]
D: AuthenticatorDelegate,
S: TokenStorage,
C: BorrowMut<Client>,
fn token<'b, I, T>(&mut self, scopes: I) -> Result<Token, Box<dyn Error>> where
T: AsRef<str> + Ord + 'b,
I: IntoIterator<Item = &'b T>,
[src]
T: AsRef<str> + Ord + 'b,
I: IntoIterator<Item = &'b T>,
Blocks until a token was retrieved from storage, from the server, or until the delegate decided to abort the attempt, or the user decided not to authorize the application. In any failure case, the delegate will be provided with additional information, and the caller will be informed about storage related errors. Otherwise it is guaranteed to be valid for the given scopes.