Skip to main content

ValidatedRequest

Struct ValidatedRequest 

Source
pub struct ValidatedRequest<Claims> {
    pub issuer: Option<String>,
    pub subject: Option<String>,
    pub audience: Vec<String>,
    pub jti: Option<String>,
    pub issued_at: Option<SystemTime>,
    pub expiration: Option<SystemTime>,
    pub cnf: Option<ConfirmationClaim>,
    pub claims: Claims,
    pub introspection_jwt: Option<String>,
}
Expand description

A validated access token request, containing the parsed claims and other metadata.

Returned by super::AccessTokenValidator::validate_request.

Fields§

§issuer: Option<String>

The issuer of the token, if present.

§subject: Option<String>

The subject of the token, if present.

§audience: Vec<String>

The audience of the token.

§jti: Option<String>

The token ID, if present.

§issued_at: Option<SystemTime>

The issued-at timestamp, if present.

§expiration: Option<SystemTime>

The expiration timestamp, if present.

§cnf: Option<ConfirmationClaim>

The key confirmation claim (cnf, RFC 7800), if present.

Binds the token to a DPoP key (jkt, RFC 9449) or mTLS certificate (x5t#S256, RFC 8705).

§claims: Claims

Additional claims beyond the registered token claim set.

Format-specific and extension claims (e.g. RFC 9068 client_id and the RFC 9396 authorization_details) live here, in the typed claims type — not as fields on this struct, which carries only the universal token set.

§introspection_jwt: Option<String>

Raw introspection JWT (RFC 9701), if the authorization server returned one.

Populated only when using crate::validator::introspection::IntrospectionValidator and the AS responded with application/token-introspection+jwt. Useful for forwarding to downstream services.

Trait Implementations§

Source§

impl<Claims: Debug> Debug for ValidatedRequest<Claims>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<C> From<ValidatedJwt<C>> for ValidatedRequest<C>

Source§

fn from(jwt: ValidatedJwt<C>) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<Claims> Freeze for ValidatedRequest<Claims>
where Claims: Freeze,

§

impl<Claims> RefUnwindSafe for ValidatedRequest<Claims>
where Claims: RefUnwindSafe,

§

impl<Claims> Send for ValidatedRequest<Claims>
where Claims: Send,

§

impl<Claims> Sync for ValidatedRequest<Claims>
where Claims: Sync,

§

impl<Claims> Unpin for ValidatedRequest<Claims>
where Claims: Unpin,

§

impl<Claims> UnsafeUnpin for ValidatedRequest<Claims>
where Claims: UnsafeUnpin,

§

impl<Claims> UnwindSafe for ValidatedRequest<Claims>
where Claims: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> MaybeSend for T
where T: Send,

Source§

impl<T> MaybeSendSync for T
where T: Send + Sync,

Source§

impl<T> MaybeSync for T
where T: Sync,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.