Trait yup_oauth2::GetToken [−][src]
pub trait GetToken { fn token<'b, I, T>(&mut self, scopes: I) -> Result<Token, Box<Error>>
where
T: AsRef<str> + Ord + 'b,
I: IntoIterator<Item = &'b T>; fn api_key(&mut self) -> Option<String>; }
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<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<D, S, C> GetToken for Authenticator<D, S, C> where
D: AuthenticatorDelegate,
S: TokenStorage,
C: BorrowMut<Client>,impl<C: BorrowMut<Client>> GetToken for ServiceAccountAccess<C>