pub struct JwtClaims {
pub access_key: SmartString,
pub nonce: SmartString,
pub query_hash: Option<SmartString>,
pub body_hash: Option<SmartString>,
pub exp: Option<i64>,
}Expand description
JWT Claims structure
Fields§
§access_key: SmartStringThe access key for the API.
nonce: SmartStringA unique nonce for the request.
query_hash: Option<SmartString>The hash of the query string, if applicable.
body_hash: Option<SmartString>The hash of the request body, if applicable.
exp: Option<i64>The expiration time for the token.
Implementations§
Source§impl JwtClaims
impl JwtClaims
Sourcepub fn new(access_key: SmartString) -> Self
pub fn new(access_key: SmartString) -> Self
Create new JWT claims with access key
Sourcepub fn with_query_hash(self, query_hash: SmartString) -> Self
pub fn with_query_hash(self, query_hash: SmartString) -> Self
Set query hash
Sourcepub fn with_body_hash(self, body_hash: SmartString) -> Self
pub fn with_body_hash(self, body_hash: SmartString) -> Self
Set body hash
Trait Implementations§
Source§impl<'de> Deserialize<'de> for JwtClaims
impl<'de> Deserialize<'de> for JwtClaims
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 JwtClaims
impl RefUnwindSafe for JwtClaims
impl Send for JwtClaims
impl Sync for JwtClaims
impl Unpin for JwtClaims
impl UnwindSafe for JwtClaims
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