TokenStore

Trait TokenStore 

Source
pub trait TokenStore: Send + Sync {
    // Required methods
    fn get_token(&self) -> WebullResult<Option<AccessToken>>;
    fn store_token(&self, token: AccessToken) -> WebullResult<()>;
    fn clear_token(&self) -> WebullResult<()>;
}
Expand description

Interface for storing and retrieving tokens.

Required Methods§

Source

fn get_token(&self) -> WebullResult<Option<AccessToken>>

Get the current access token.

Source

fn store_token(&self, token: AccessToken) -> WebullResult<()>

Store an access token.

Source

fn clear_token(&self) -> WebullResult<()>

Clear the stored token.

Implementors§