Struct yup_oauth2::DiskTokenStorage
[−]
[src]
pub struct DiskTokenStorage { // some fields omitted }
Serializes tokens to a JSON file on disk.
Methods
impl DiskTokenStorage
[src]
fn new(location: &String) -> Result<DiskTokenStorage, Error>
fn dump_to_file(&mut self) -> Result<(), Error>
Trait Implementations
impl Default for DiskTokenStorage
[src]
fn default() -> DiskTokenStorage
Returns the "default value" for a type. Read more
impl TokenStorage for DiskTokenStorage
[src]
type Error = Error
fn set(&mut self, scope_hash: u64, _: &Vec<&str>, token: Option<Token>) -> Result<(), Self::Error>
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>, Self::Error>
A None
result indicates that there is no token for the given scope_hash.