pub struct OAuthFlow { /* private fields */ }Expand description
OAuth 2.0 authentication flow
Implementations§
Source§impl OAuthFlow
impl OAuthFlow
pub fn new(client_id: String, client_secret: String) -> Self
Sourcepub async fn authenticate(
&self,
auth_manager: &AuthManager,
) -> Result<Credential>
pub async fn authenticate( &self, auth_manager: &AuthManager, ) -> Result<Credential>
Run the OAuth 2.0 authentication flow
Sourcepub async fn refresh_token(
&self,
auth_manager: &AuthManager,
refresh_token: &str,
) -> Result<Credential>
pub async fn refresh_token( &self, auth_manager: &AuthManager, refresh_token: &str, ) -> Result<Credential>
Refresh an expired OAuth token
Auto Trait Implementations§
impl Freeze for OAuthFlow
impl RefUnwindSafe for OAuthFlow
impl Send for OAuthFlow
impl Sync for OAuthFlow
impl Unpin for OAuthFlow
impl UnwindSafe for OAuthFlow
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more