pub struct OAuthClaims {
pub sub: String,
pub iss: String,
pub aud: Vec<String>,
pub exp: u64,
pub iat: u64,
pub scope: String,
pub resource: Option<String>,
pub cnf: Option<OAuthConfirmationClaim>,
}Expand description
Extracted and validated claims from a JWT token.
Fields§
§sub: StringSubject identifier (the authenticated user/client).
iss: StringIssuer.
aud: Vec<String>Audience (can be a single string or array; we normalize to Vec).
exp: u64Expiry (Unix timestamp).
iat: u64Issued-at (Unix timestamp).
scope: StringSpace-delimited scope string (OAuth 2.1 convention).
resource: Option<String>Resource indicator (RFC 8707). Identifies which resource server this token is scoped to. May be a single string or absent.
cnf: Option<OAuthConfirmationClaim>Token confirmation claim (RFC 7800 / RFC 9449).
When present with cnf.jkt, binds the access token to a DPoP key.
Implementations§
Trait Implementations§
Source§impl Clone for OAuthClaims
impl Clone for OAuthClaims
Source§fn clone(&self) -> OAuthClaims
fn clone(&self) -> OAuthClaims
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OAuthClaims
impl Debug for OAuthClaims
Source§impl<'de> Deserialize<'de> for OAuthClaims
impl<'de> Deserialize<'de> for OAuthClaims
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl OAuthAuditClaims for OAuthClaims
impl OAuthAuditClaims for OAuthClaims
fn oauth_subject(&self) -> &str
fn oauth_scope(&self) -> &str
Auto Trait Implementations§
impl Freeze for OAuthClaims
impl RefUnwindSafe for OAuthClaims
impl Send for OAuthClaims
impl Sync for OAuthClaims
impl Unpin for OAuthClaims
impl UnsafeUnpin for OAuthClaims
impl UnwindSafe for OAuthClaims
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
Mutably borrows from an owned value. Read more