pub trait TokenStore: Send + Sync {
// Required methods
fn load<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<TokenSet>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn save<'life0, 'async_trait>(
&'life0 self,
tokens: TokenSet,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Persistence for OAuth tokens (memory, file, Redis, Postgres, …).
GoHighLevel rotates the refresh token on every use, so implementations
must persist what TokenStore::save hands them or the integration
will lose its session on restart.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".