Struct yup_oauth2::MemoryStorage
[−]
[src]
pub struct MemoryStorage { pub tokens: HashMap<u64, Token>, }
A storage that remembers values for one session only.
Fields
tokens: HashMap<u64, Token>
Trait Implementations
impl Default for MemoryStorage
[src]
fn default() -> MemoryStorage
Returns the "default value" for a type. Read more
impl TokenStorage for MemoryStorage
[src]
type Error = NullError
fn set(&mut self,
scope_hash: u64,
_: &Vec<&str>,
token: Option<Token>)
-> Result<(), NullError>
scope_hash: u64,
_: &Vec<&str>,
token: Option<Token>)
-> Result<(), NullError>
If token
is None, it is invalid or revoked and should be removed from storage. Otherwise, it should be saved. Read more
fn get(&self,
scope_hash: u64,
_: &Vec<&str>)
-> Result<Option<Token>, NullError>
scope_hash: u64,
_: &Vec<&str>)
-> Result<Option<Token>, NullError>
A None
result indicates that there is no token for the given scope_hash.