pub trait RefreshTokenStore: Send + Sync {
// Required methods
fn load<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 TokenStoreKey,
) -> Pin<Box<dyn Future<Output = Result<Option<SerializedTokens>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn save<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 TokenStoreKey,
tokens: &'life2 SerializedTokens,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn delete<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 TokenStoreKey,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Trait for storing and retrieving refresh tokens
Required Methods§
Sourcefn load<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 TokenStoreKey,
) -> Pin<Box<dyn Future<Output = Result<Option<SerializedTokens>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 TokenStoreKey,
) -> Pin<Box<dyn Future<Output = Result<Option<SerializedTokens>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Load tokens for the given key
Sourcefn save<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 TokenStoreKey,
tokens: &'life2 SerializedTokens,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn save<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 TokenStoreKey,
tokens: &'life2 SerializedTokens,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Save tokens for the given key