pub struct OAuthFlow { /* private fields */ }Expand description
The sign-in service used by coven’s composition roots. Apps configure
OAuthClients and OAuthPresenter; only coven receives tokens.
Implementations§
Source§impl OAuthFlow
impl OAuthFlow
Sourcepub fn new(exchange: OAuthExchange, presenter: Arc<dyn OAuthPresenter>) -> Self
pub fn new(exchange: OAuthExchange, presenter: Arc<dyn OAuthPresenter>) -> Self
Compose the provider protocol with the app’s presentation capability.
Sourcepub async fn authenticate(
&self,
access: OAuthAccess,
) -> Result<OAuthTokens, OAuthError>
pub async fn authenticate( &self, access: OAuthAccess, ) -> Result<OAuthTokens, OAuthError>
Exchange a checked redirect. Dropping this future cancels presentation; no detached task survives it. The caller commits tokens to custody.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for OAuthFlow
impl !RefUnwindSafe for OAuthFlow
impl Send for OAuthFlow
impl Sync for OAuthFlow
impl Unpin for OAuthFlow
impl UnsafeUnpin 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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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 moreCreates a shared type from an unshared type.