pub struct RevocationRequest<'a, RT, TE>where
RT: RevocableToken,
TE: ErrorResponse,{ /* private fields */ }Expand description
A request to revoke a token via an RFC 7009 compatible
endpoint.
Implementations§
Source§impl<'a, RT, TE> RevocationRequest<'a, RT, TE>where
RT: RevocableToken,
TE: ErrorResponse + 'static,
impl<'a, RT, TE> RevocationRequest<'a, RT, TE>where
RT: RevocableToken,
TE: ErrorResponse + 'static,
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 revocation 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 7662.
§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 request<C>(
self,
http_client: &C,
) -> Result<(), RequestTokenError<<C as SyncHttpClient>::Error, TE>>where
C: SyncHttpClient,
pub fn request<C>(
self,
http_client: &C,
) -> Result<(), RequestTokenError<<C as SyncHttpClient>::Error, TE>>where
C: SyncHttpClient,
Synchronously sends the request to the authorization server and awaits a response.
A successful response indicates that the server either revoked the token or the token was not known to the server.
Error UnsupportedTokenType will be returned if the
type of token type given is not supported by the server.
Sourcepub fn request_async<'c, C>(
self,
http_client: &'c C,
) -> impl Future<Output = Result<(), 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<(), RequestTokenError<<C as AsyncHttpClient<'c>>::Error, TE>>> + 'cwhere
Self: 'c,
C: AsyncHttpClient<'c>,
Asynchronously sends the request to the authorization server and returns a Future.
Trait Implementations§
Source§impl<'a, RT, TE> Debug for RevocationRequest<'a, RT, TE>
impl<'a, RT, TE> Debug for RevocationRequest<'a, RT, TE>
Auto Trait Implementations§
impl<'a, RT, TE> Freeze for RevocationRequest<'a, RT, TE>where
RT: Freeze,
impl<'a, RT, TE> RefUnwindSafe for RevocationRequest<'a, RT, TE>where
RT: RefUnwindSafe,
TE: RefUnwindSafe,
impl<'a, RT, TE> Send for RevocationRequest<'a, RT, TE>
impl<'a, RT, TE> Sync for RevocationRequest<'a, RT, TE>
impl<'a, RT, TE> Unpin for RevocationRequest<'a, RT, TE>
impl<'a, RT, TE> UnwindSafe for RevocationRequest<'a, RT, TE>where
RT: UnwindSafe,
TE: 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
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>
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>
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