pub struct OAuthAccountApi;Expand description
Trusted direct account operations. The caller supplies the authorized user;
these methods are not HTTP routes. HTTP handlers always resolve the session
first, and cannot select a principal with a userId body/query field.
Implementations§
Source§impl OAuthAccountApi
impl OAuthAccountApi
Sourcepub async fn get_access_token(
user_id: &str,
selection: OAuthAccountSelection,
ctx: &AuthContext<impl AuthSchema>,
) -> AuthResult<OAuthTokenSet>
pub async fn get_access_token( user_id: &str, selection: OAuthAccountSelection, ctx: &AuthContext<impl AuthSchema>, ) -> AuthResult<OAuthTokenSet>
Source’s getAccessToken result: a valid access token, refreshed and
persisted when it is within five seconds of expiry, with its expiry,
the stored scopes and the ID token.
Sourcepub async fn refresh_token(
user_id: &str,
selection: OAuthAccountSelection,
ctx: &AuthContext<impl AuthSchema>,
) -> AuthResult<OAuthTokenSet>
pub async fn refresh_token( user_id: &str, selection: OAuthAccountSelection, ctx: &AuthContext<impl AuthSchema>, ) -> AuthResult<OAuthTokenSet>
Source’s refreshToken result: the refreshed grant, the retained refresh
token when the provider did not rotate it, and the stored scopes.
pub async fn account_info( user_id: &str, selection: OAuthAccountSelection, ctx: &AuthContext<impl AuthSchema>, ) -> AuthResult<OAuthAccountProfile>
Auto Trait Implementations§
impl Freeze for OAuthAccountApi
impl RefUnwindSafe for OAuthAccountApi
impl Send for OAuthAccountApi
impl Sync for OAuthAccountApi
impl Unpin for OAuthAccountApi
impl UnsafeUnpin for OAuthAccountApi
impl UnwindSafe for OAuthAccountApi
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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