pub struct PasswordTokenRequest<'a, TE, TR>where
TE: ErrorResponse,
TR: TokenResponse,{ /* private fields */ }
Expand description
A request to exchange resource owner credentials for an access token.
Implementations§
Source§impl<'a, TE, TR> PasswordTokenRequest<'a, TE, TR>where
TE: ErrorResponse + 'static,
TR: TokenResponse,
impl<'a, TE, TR> PasswordTokenRequest<'a, TE, TR>where
TE: ErrorResponse + 'static,
TR: TokenResponse,
Sourcepub fn add_extra_param<N, V>(self, name: N, value: V) -> Self
pub fn add_extra_param<N, V>(self, name: N, value: V) -> Self
Appends an extra param to the token request.
This method allows extensions to be used without direct support from
this crate. If name
conflicts with a parameter managed by this crate, the
behavior is undefined. In particular, do not set parameters defined by
RFC 6749 or
RFC 7636.
§Security Warning
Callers should follow the security recommendations for any OAuth2 extensions used with this function, which are beyond the scope of RFC 6749.
Sourcepub fn add_scopes<I>(self, scopes: I) -> Selfwhere
I: IntoIterator<Item = Scope>,
pub fn add_scopes<I>(self, scopes: I) -> Selfwhere
I: IntoIterator<Item = Scope>,
Appends a collection of scopes to the token request.
Sourcepub fn request<C>(
self,
http_client: &C,
) -> Result<TR, RequestTokenError<<C as SyncHttpClient>::Error, TE>>where
C: SyncHttpClient,
pub fn request<C>(
self,
http_client: &C,
) -> Result<TR, RequestTokenError<<C as SyncHttpClient>::Error, TE>>where
C: SyncHttpClient,
Synchronously sends the request to the authorization server and awaits a response.
Sourcepub fn request_async<'c, C>(
self,
http_client: &'c C,
) -> impl Future<Output = Result<TR, RequestTokenError<<C as AsyncHttpClient<'c>>::Error, TE>>> + 'cwhere
Self: 'c,
C: AsyncHttpClient<'c>,
pub fn request_async<'c, C>(
self,
http_client: &'c C,
) -> impl Future<Output = Result<TR, RequestTokenError<<C as AsyncHttpClient<'c>>::Error, TE>>> + 'cwhere
Self: 'c,
C: AsyncHttpClient<'c>,
Asynchronously sends the request to the authorization server and awaits a response.
Trait Implementations§
Source§impl<'a, TE, TR> Debug for PasswordTokenRequest<'a, TE, TR>
impl<'a, TE, TR> Debug for PasswordTokenRequest<'a, TE, TR>
Auto Trait Implementations§
impl<'a, TE, TR> Freeze for PasswordTokenRequest<'a, TE, TR>
impl<'a, TE, TR> RefUnwindSafe for PasswordTokenRequest<'a, TE, TR>where
TE: RefUnwindSafe,
TR: RefUnwindSafe,
impl<'a, TE, TR> Send for PasswordTokenRequest<'a, TE, TR>
impl<'a, TE, TR> Sync for PasswordTokenRequest<'a, TE, TR>
impl<'a, TE, TR> Unpin for PasswordTokenRequest<'a, TE, TR>
impl<'a, TE, TR> UnwindSafe for PasswordTokenRequest<'a, TE, TR>where
TE: UnwindSafe,
TR: UnwindSafe,
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