pub struct RefreshingTokens { /* private fields */ }Expand description
Fresh access tokens from a grant, cached until a minute before they expire.
Implementations§
Trait Implementations§
Source§impl AccessTokenProvider for RefreshingTokens
impl AccessTokenProvider for RefreshingTokens
Source§fn access_token<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn access_token<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
A valid access token. Fails with
AuthRequired if the user must sign in again.Source§fn invalidate<'life0, 'life1, 'async_trait>(
&'life0 self,
rejected: &'life1 str,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn invalidate<'life0, 'life1, 'async_trait>(
&'life0 self,
rejected: &'life1 str,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Called once when the backend rejected
token (HTTP 401); the provider should refresh it.Auto Trait Implementations§
impl !Freeze for RefreshingTokens
impl !RefUnwindSafe for RefreshingTokens
impl !UnwindSafe for RefreshingTokens
impl Send for RefreshingTokens
impl Sync for RefreshingTokens
impl Unpin for RefreshingTokens
impl UnsafeUnpin for RefreshingTokens
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more