Skip to main content

OAuthAuthorizationStateStore

Trait OAuthAuthorizationStateStore 

Source
pub trait OAuthAuthorizationStateStore: Send + Sync {
    // Required methods
    fn load<'life0, 'life1, 'async_trait>(
        &'life0 self,
        state: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Option<OAuthPendingAuthorizationState>, OAuthClientError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn save<'life0, 'life1, 'async_trait>(
        &'life0 self,
        state: &'life1 OAuthPendingAuthorizationState,
    ) -> Pin<Box<dyn Future<Output = Result<(), OAuthClientError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn remove<'life0, 'life1, 'async_trait>(
        &'life0 self,
        state: &'life1 str,
    ) -> 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 PKCE and CSRF state.

Required Methods§

Source

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

Load pending authorization state by the exact CSRF state key.

Source

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

Save pending authorization state.

Source

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

Remove consumed or abandoned state.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§