Struct oauth2::RefreshTokenRequest [−][src]
pub struct RefreshTokenRequest<'a, TE, TR, TT> where
TE: ErrorResponse,
TR: TokenResponse<TT>,
TT: TokenType, { /* fields omitted */ }
Expand description
A request to exchange a refresh token for an access token.
See https://tools.ietf.org/html/rfc6749#section-6.
Implementations
impl<'a, TE, TR, TT> RefreshTokenRequest<'a, TE, TR, TT> where
TE: ErrorResponse + 'static,
TR: TokenResponse<TT>,
TT: TokenType,
impl<'a, TE, TR, TT> RefreshTokenRequest<'a, TE, TR, TT> where
TE: ErrorResponse + 'static,
TR: TokenResponse<TT>,
TT: TokenType,
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.
Appends a collection of scopes to the token request.
pub fn request<F, RE>(
self,
http_client: F
) -> Result<TR, RequestTokenError<RE, TE>> where
F: FnOnce(HttpRequest) -> Result<HttpResponse, RE>,
RE: Error + 'static,
pub fn request<F, RE>(
self,
http_client: F
) -> Result<TR, RequestTokenError<RE, TE>> where
F: FnOnce(HttpRequest) -> Result<HttpResponse, RE>,
RE: Error + 'static,
Synchronously sends the request to the authorization server and awaits a response.
pub async fn request_async<C, F, RE>(
self,
http_client: C
) -> Result<TR, RequestTokenError<RE, TE>> where
C: FnOnce(HttpRequest) -> F,
F: Future<Output = Result<HttpResponse, RE>>,
RE: Error + 'static,
pub async fn request_async<C, F, RE>(
self,
http_client: C
) -> Result<TR, RequestTokenError<RE, TE>> where
C: FnOnce(HttpRequest) -> F,
F: Future<Output = Result<HttpResponse, RE>>,
RE: Error + 'static,
Asynchronously sends the request to the authorization server and awaits a response.
Trait Implementations
impl<'a, TE: Debug, TR: Debug, TT: Debug> Debug for RefreshTokenRequest<'a, TE, TR, TT> where
TE: ErrorResponse,
TR: TokenResponse<TT>,
TT: TokenType,
impl<'a, TE: Debug, TR: Debug, TT: Debug> Debug for RefreshTokenRequest<'a, TE, TR, TT> where
TE: ErrorResponse,
TR: TokenResponse<TT>,
TT: TokenType,
Auto Trait Implementations
impl<'a, TE, TR, TT> RefUnwindSafe for RefreshTokenRequest<'a, TE, TR, TT> where
TE: RefUnwindSafe,
TR: RefUnwindSafe,
TT: RefUnwindSafe,
impl<'a, TE, TR, TT> Send for RefreshTokenRequest<'a, TE, TR, TT> where
TE: Send,
TR: Send,
TT: Send,
impl<'a, TE, TR, TT> Sync for RefreshTokenRequest<'a, TE, TR, TT> where
TE: Sync,
TR: Sync,
TT: Sync,
impl<'a, TE, TR, TT> Unpin for RefreshTokenRequest<'a, TE, TR, TT> where
TE: Unpin,
TR: Unpin,
TT: Unpin,
impl<'a, TE, TR, TT> UnwindSafe for RefreshTokenRequest<'a, TE, TR, TT> where
TE: UnwindSafe,
TR: UnwindSafe,
TT: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more