pub struct OAuthSession { /* private fields */ }Expand description
A device’s provider sign-in and HTTP connection, injected into its provider. A token is used until the provider rejects it with HTTP 401; the request then refreshes once through the sign-in’s custody and is retried once (§20.2).
Implementations§
Source§impl OAuthSession
impl OAuthSession
Sourcepub async fn account(&self) -> Result<String, StorageError>
pub async fn account(&self) -> Result<String, StorageError>
Resolve the signed-in account through the provider’s own identity API.
Sourcepub async fn set_tokens(&self, tokens: OAuthTokens)
pub async fn set_tokens(&self, tokens: OAuthTokens)
Install tokens after their owner committed them to custody.
Auto Trait Implementations§
impl !Freeze for OAuthSession
impl !RefUnwindSafe for OAuthSession
impl Send for OAuthSession
impl Sync for OAuthSession
impl Unpin for OAuthSession
impl UnsafeUnpin for OAuthSession
impl !UnwindSafe for OAuthSession
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
§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.