Struct openidconnect::IntrospectionRequest [−][src]
pub struct IntrospectionRequest<'a, TE, TIR, TT> where
TE: ErrorResponse,
TT: TokenType,
TIR: TokenIntrospectionResponse<TT>, { /* fields omitted */ }
A request to introspect an access token.
See https://tools.ietf.org/html/rfc7662#section-2.1
Implementations
impl<'a, TE, TIR, TT> IntrospectionRequest<'a, TE, TIR, TT> where
TE: ErrorResponse + 'static,
TT: TokenType,
TIR: TokenIntrospectionResponse<TT>,
[src]
impl<'a, TE, TIR, TT> IntrospectionRequest<'a, TE, TIR, TT> where
TE: ErrorResponse + 'static,
TT: TokenType,
TIR: TokenIntrospectionResponse<TT>,
[src]pub fn set_token_type_hint<V>(
self,
value: V
) -> IntrospectionRequest<'a, TE, TIR, TT> where
V: Into<Cow<'a, str>>,
[src]
self,
value: V
) -> IntrospectionRequest<'a, TE, TIR, TT> where
V: Into<Cow<'a, str>>,
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.
pub fn add_extra_param<N, V>(
self,
name: N,
value: V
) -> IntrospectionRequest<'a, TE, TIR, TT> where
N: Into<Cow<'a, str>>,
V: Into<Cow<'a, str>>,
[src]
self,
name: N,
value: V
) -> IntrospectionRequest<'a, TE, TIR, TT> where
N: Into<Cow<'a, str>>,
V: Into<Cow<'a, str>>,
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.
pub fn request<F, RE>(
self,
http_client: F
) -> Result<TIR, RequestTokenError<RE, TE>> where
RE: Error + 'static,
F: FnOnce(HttpRequest) -> Result<HttpResponse, RE>,
[src]
self,
http_client: F
) -> Result<TIR, RequestTokenError<RE, TE>> where
RE: Error + 'static,
F: FnOnce(HttpRequest) -> Result<HttpResponse, RE>,
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<TIR, RequestTokenError<RE, TE>> where
C: FnOnce(HttpRequest) -> F,
RE: Error + 'static,
F: Future<Output = Result<HttpResponse, RE>>,
[src]
self,
http_client: C
) -> Result<TIR, RequestTokenError<RE, TE>> where
C: FnOnce(HttpRequest) -> F,
RE: Error + 'static,
F: Future<Output = Result<HttpResponse, RE>>,
Asynchronously sends the request to the authorization server and returns a Future.
Trait Implementations
impl<'a, TE, TIR, TT> Debug for IntrospectionRequest<'a, TE, TIR, TT> where
TE: Debug + ErrorResponse,
TT: Debug + TokenType,
TIR: Debug + TokenIntrospectionResponse<TT>,
[src]
impl<'a, TE, TIR, TT> Debug for IntrospectionRequest<'a, TE, TIR, TT> where
TE: Debug + ErrorResponse,
TT: Debug + TokenType,
TIR: Debug + TokenIntrospectionResponse<TT>,
[src]Auto Trait Implementations
impl<'a, TE, TIR, TT> RefUnwindSafe for IntrospectionRequest<'a, TE, TIR, TT> where
TE: RefUnwindSafe,
TIR: RefUnwindSafe,
TT: RefUnwindSafe,
impl<'a, TE, TIR, TT> RefUnwindSafe for IntrospectionRequest<'a, TE, TIR, TT> where
TE: RefUnwindSafe,
TIR: RefUnwindSafe,
TT: RefUnwindSafe,
impl<'a, TE, TIR, TT> Send for IntrospectionRequest<'a, TE, TIR, TT> where
TE: Send,
TIR: Send,
TT: Send,
impl<'a, TE, TIR, TT> Send for IntrospectionRequest<'a, TE, TIR, TT> where
TE: Send,
TIR: Send,
TT: Send,
impl<'a, TE, TIR, TT> Sync for IntrospectionRequest<'a, TE, TIR, TT> where
TE: Sync,
TIR: Sync,
TT: Sync,
impl<'a, TE, TIR, TT> Sync for IntrospectionRequest<'a, TE, TIR, TT> where
TE: Sync,
TIR: Sync,
TT: Sync,
impl<'a, TE, TIR, TT> Unpin for IntrospectionRequest<'a, TE, TIR, TT> where
TE: Unpin,
TIR: Unpin,
TT: Unpin,
impl<'a, TE, TIR, TT> Unpin for IntrospectionRequest<'a, TE, TIR, TT> where
TE: Unpin,
TIR: Unpin,
TT: Unpin,
impl<'a, TE, TIR, TT> UnwindSafe for IntrospectionRequest<'a, TE, TIR, TT> where
TE: UnwindSafe,
TIR: UnwindSafe,
TT: UnwindSafe,
impl<'a, TE, TIR, TT> UnwindSafe for IntrospectionRequest<'a, TE, TIR, TT> where
TE: UnwindSafe,
TIR: UnwindSafe,
TT: UnwindSafe,
Blanket Implementations
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,