Skip to main content

OAuthTokenStore

Trait OAuthTokenStore 

Source
pub trait OAuthTokenStore: Send + Sync {
    // Required methods
    fn load<'life0, 'life1, 'async_trait>(
        &'life0 self,
        binding: &'life1 OAuthTokenBinding,
    ) -> Pin<Box<dyn Future<Output = Result<Option<OAuthStoredToken>, OAuthClientError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn save<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        binding: &'life1 OAuthTokenBinding,
        token: &'life2 OAuthStoredToken,
    ) -> Pin<Box<dyn Future<Output = Result<(), OAuthClientError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn remove<'life0, 'life1, 'async_trait>(
        &'life0 self,
        binding: &'life1 OAuthTokenBinding,
    ) -> Pin<Box<dyn Future<Output = Result<(), OAuthClientError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Persistent storage for resource/issuer/client-bound OAuth tokens.

Required Methods§

Source

fn load<'life0, 'life1, 'async_trait>( &'life0 self, binding: &'life1 OAuthTokenBinding, ) -> Pin<Box<dyn Future<Output = Result<Option<OAuthStoredToken>, OAuthClientError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Load a token set for an exact binding.

Source

fn save<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, binding: &'life1 OAuthTokenBinding, token: &'life2 OAuthStoredToken, ) -> Pin<Box<dyn Future<Output = Result<(), OAuthClientError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Save a token set for an exact binding.

Source

fn remove<'life0, 'life1, 'async_trait>( &'life0 self, binding: &'life1 OAuthTokenBinding, ) -> Pin<Box<dyn Future<Output = Result<(), OAuthClientError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Remove a token set for an exact binding.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§