[−][src]Struct oauth2::RefreshTokenRequest
A request to exchange a refresh token for an access token.
See https://tools.ietf.org/html/rfc6749#section-6.
Methods
impl<'a, TE, TR, TT> RefreshTokenRequest<'a, TE, TR, TT> where
TE: ErrorResponse,
TR: TokenResponse<TT>,
TT: TokenType,
[src]
TE: ErrorResponse,
TR: TokenResponse<TT>,
TT: TokenType,
pub fn add_extra_param<N, V>(self, name: N, value: V) -> Self where
N: Into<Cow<'a, str>>,
V: Into<Cow<'a, str>>,
[src]
N: Into<Cow<'a, str>>,
V: Into<Cow<'a, str>>,
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.
pub fn add_scope(self, scope: Scope) -> Self
[src]
Appends a new scope 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: Fail,
[src]
self,
http_client: F
) -> Result<TR, RequestTokenError<RE, TE>> where
F: FnOnce(HttpRequest) -> Result<HttpResponse, RE>,
RE: Fail,
Synchronously sends the request to the authorization server and awaits a response.
impl<'a, TE, TR, TT> RefreshTokenRequest<'a, TE, TR, TT> where
TE: ErrorResponse + 'static,
TR: TokenResponse<TT>,
TT: TokenType,
[src]
TE: ErrorResponse + 'static,
TR: TokenResponse<TT>,
TT: TokenType,
pub fn request_future<C, F, RE>(
self,
http_client: C
) -> impl Future<Item = TR, Error = RequestTokenError<RE, TE>> where
C: FnOnce(HttpRequest) -> F,
F: Future<Item = HttpResponse, Error = RE>,
RE: Fail,
[src]
self,
http_client: C
) -> impl Future<Item = TR, Error = RequestTokenError<RE, TE>> where
C: FnOnce(HttpRequest) -> F,
F: Future<Item = HttpResponse, Error = RE>,
RE: Fail,
Asynchronously sends the request to the authorization server and awaits a response.
Trait Implementations
impl<'_, TE, TR, TT> AsyncRefreshTokenRequest<TE, TR, TT> for RefreshTokenRequest<'_, TE, TR, TT> where
TE: ErrorResponse + 'static,
TR: TokenResponse<TT> + Send,
TT: TokenType + Send,
[src]
TE: ErrorResponse + 'static,
TR: TokenResponse<TT> + Send,
TT: TokenType + Send,
fn request_async<'async_trait, C, F, RE>(
self,
http_client: C
) -> Pin<Box<dyn Future<Output = Result<TR, RequestTokenError<RE, TE>>> + Send + 'async_trait>> where
C: FnOnce(HttpRequest) -> F + Send,
F: Future<Output = Result<HttpResponse, RE>> + Send,
RE: Fail,
C: 'async_trait,
F: 'async_trait,
RE: 'async_trait,
Self: 'async_trait,
[src]
self,
http_client: C
) -> Pin<Box<dyn Future<Output = Result<TR, RequestTokenError<RE, TE>>> + Send + 'async_trait>> where
C: FnOnce(HttpRequest) -> F + Send,
F: Future<Output = Result<HttpResponse, RE>> + Send,
RE: Fail,
C: 'async_trait,
F: 'async_trait,
RE: 'async_trait,
Self: 'async_trait,
Asynchronously sends the request to the authorization server and awaits a response.
impl<'a, TE: Debug, TR: Debug, TT: Debug> Debug for RefreshTokenRequest<'a, TE, TR, TT> where
TE: ErrorResponse,
TR: TokenResponse<TT>,
TT: TokenType,
[src]
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,
TE: RefUnwindSafe,
TR: RefUnwindSafe,
TT: RefUnwindSafe,
impl<'a, TE, TR, TT> Send for RefreshTokenRequest<'a, TE, TR, TT> where
TR: Send,
TT: Send,
TR: Send,
TT: Send,
impl<'a, TE, TR, TT> Sync for RefreshTokenRequest<'a, TE, TR, TT> where
TR: Sync,
TT: Sync,
TR: Sync,
TT: Sync,
impl<'a, TE, TR, TT> Unpin for RefreshTokenRequest<'a, TE, TR, TT> where
TE: Unpin,
TR: Unpin,
TT: Unpin,
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,
TE: UnwindSafe,
TR: UnwindSafe,
TT: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
U: TryFrom<T>,