pub struct TokenClaims {}
Expand description
JWT token claims following RFC 7519
Fields§
§iss: String
Issuer (iss) - who issued the token
sub: String
Subject (sub) - the user/key this token represents
aud: Vec<String>
Audience (aud) - intended recipients
exp: i64
Expiration time (exp) - when token expires (Unix timestamp)
nbf: i64
Not before (nbf) - token not valid before this time
iat: i64
Issued at (iat) - when token was issued
jti: String
JWT ID (jti) - unique identifier for this token
roles: Vec<Role>
User roles
key_id: Option<String>
API key ID this token was derived from
client_ip: Option<String>
Client IP address
session_id: Option<String>
Session ID for correlation
scope: Vec<String>
Scope - what this token can access
token_type: TokenType
Token type (access, refresh, etc.)
Trait Implementations§
Source§impl Clone for TokenClaims
impl Clone for TokenClaims
Source§fn clone(&self) -> TokenClaims
fn clone(&self) -> TokenClaims
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 TokenClaims
impl Debug for TokenClaims
Source§impl<'de> Deserialize<'de> for TokenClaims
impl<'de> Deserialize<'de> for TokenClaims
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
Auto Trait Implementations§
impl Freeze for TokenClaims
impl RefUnwindSafe for TokenClaims
impl Send for TokenClaims
impl Sync for TokenClaims
impl Unpin for TokenClaims
impl UnwindSafe for TokenClaims
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