pub trait TokenCustody: Send + Sync {
// Required method
fn replace<'life0, 'life1, 'async_trait>(
&'life0 self,
rejected: &'life1 OAuthTokens,
) -> Pin<Box<dyn Future<Output = Result<OAuthTokens, StorageError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
The custody of a connection’s sign-in: coven’s session custody before setup or bootstrap publishes the store, device custody afterwards (§20.2).
Required Methods§
Sourcefn replace<'life0, 'life1, 'async_trait>(
&'life0 self,
rejected: &'life1 OAuthTokens,
) -> Pin<Box<dyn Future<Output = Result<OAuthTokens, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn replace<'life0, 'life1, 'async_trait>(
&'life0 self,
rejected: &'life1 OAuthTokens,
) -> Pin<Box<dyn Future<Output = Result<OAuthTokens, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Replace tokens the provider rejected with HTTP 401. When the held
sign-in no longer is rejected (another connection refreshed it, or a
new sign-in was committed), return the held one; otherwise refresh once
and commit the replacement here before returning it. A failed refresh
or commit returns its error and installs nothing.