pub struct GoogleAuth { /* private fields */ }Expand description
Access tokens for one Google account, refreshed on demand and saved
back through backend.
Implementations§
Source§impl GoogleAuth
impl GoogleAuth
pub fn new( http: Client, cfg: GoogleOAuthConfig, backend: Arc<dyn TokenBackend>, email: impl Into<String>, ) -> Self
Sourcepub async fn access_token(&self) -> ProviderResult<String>
pub async fn access_token(&self) -> ProviderResult<String>
A valid access token, refreshing (and saving) first when the stored one is within a minute of expiry.
Auto Trait Implementations§
impl !Freeze for GoogleAuth
impl !RefUnwindSafe for GoogleAuth
impl !UnwindSafe for GoogleAuth
impl Forget for GoogleAuth
impl Move for GoogleAuth
impl Send for GoogleAuth
impl Sync for GoogleAuth
impl Unpin for GoogleAuth
impl UnsafeUnpin for GoogleAuth
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