pub struct IntrospectionRequest<'a, TE, TIR>where
TE: ErrorResponse,
TIR: TokenIntrospectionResponse,{ /* private fields */ }
Expand description
A request to introspect an access token.
Implementations§
Source§impl<'a, TE, TIR> IntrospectionRequest<'a, TE, TIR>where
TE: ErrorResponse + 'static,
TIR: TokenIntrospectionResponse,
impl<'a, TE, TIR> IntrospectionRequest<'a, TE, TIR>where
TE: ErrorResponse + 'static,
TIR: TokenIntrospectionResponse,
Sourcepub fn set_token_type_hint<V>(self, value: V) -> Self
pub fn set_token_type_hint<V>(self, value: V) -> Self
Sets the optional token_type_hint parameter.
See https://tools.ietf.org/html/rfc7662#section-2.1.
OPTIONAL. A hint about the type of the token submitted for introspection. The protected resource MAY pass this parameter to help the authorization server optimize the token lookup. If the server is unable to locate the token using the given hint, it MUST extend its search across all of its supported token types. An authorization server MAY ignore this parameter, particularly if it is able to detect the token type automatically. Values for this field are defined in the “OAuth Token Type Hints” registry defined in OAuth Token Revocation RFC7009.
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 introspection 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<TIR, RequestTokenError<<C as SyncHttpClient>::Error, TE>>where
C: SyncHttpClient,
pub fn request<C>(
self,
http_client: &C,
) -> Result<TIR, 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<TIR, 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<TIR, 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, TE, TIR> Debug for IntrospectionRequest<'a, TE, TIR>
impl<'a, TE, TIR> Debug for IntrospectionRequest<'a, TE, TIR>
Auto Trait Implementations§
impl<'a, TE, TIR> Freeze for IntrospectionRequest<'a, TE, TIR>
impl<'a, TE, TIR> RefUnwindSafe for IntrospectionRequest<'a, TE, TIR>where
TE: RefUnwindSafe,
TIR: RefUnwindSafe,
impl<'a, TE, TIR> Send for IntrospectionRequest<'a, TE, TIR>
impl<'a, TE, TIR> Sync for IntrospectionRequest<'a, TE, TIR>
impl<'a, TE, TIR> Unpin for IntrospectionRequest<'a, TE, TIR>
impl<'a, TE, TIR> UnwindSafe for IntrospectionRequest<'a, TE, TIR>where
TE: UnwindSafe,
TIR: 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