pub struct AuthService { /* private fields */ }Expand description
OAuth login and token refresh service.
Implementations§
Source§impl AuthService
impl AuthService
pub fn new(store: MetadataStore) -> Self
pub fn login_oauth(&self, client_id: String) -> Result<()>
pub fn login_oauth_with_redirect( &self, client_id: String, redirect_uri: &str, ) -> Result<()>
pub fn login(&self, token: AuthToken) -> Result<()>
pub fn status(&self) -> Result<AuthStatus>
pub fn scopes(&self) -> Result<AuthScopes>
pub fn token(&self) -> Result<AuthToken>
pub fn clear(&self) -> Result<()>
pub fn country(&self) -> Result<Option<String>>
pub fn set_country(&self, country: Option<String>) -> Result<()>
pub fn user_name(&self) -> Result<Option<String>>
pub fn set_user_name(&self, user_name: Option<String>) -> Result<()>
pub fn ensure_user_name(&self) -> Result<Option<String>>
Trait Implementations§
Source§impl Clone for AuthService
impl Clone for AuthService
Source§fn clone(&self) -> AuthService
fn clone(&self) -> AuthService
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for AuthService
impl RefUnwindSafe for AuthService
impl Send for AuthService
impl Sync for AuthService
impl Unpin for AuthService
impl UnwindSafe for AuthService
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more