pub enum AuthData<T: Serialize + DeserializeOwned = ()> {
None,
Text(String),
Number(f64),
TextNumber(String, f64),
Structured(T),
}
Expand description
The data in the JWT.
This stores any data attached to a logged in user. This data is not secret - it can be ready by the receiver. The authenticity of the message is however always conserved (as long as your secret hasn’t leaked).
Variants§
None
No data.
Text(String)
Text data.
Number(f64)
A number.
TextNumber(String, f64)
Text and a number.
Structured(T)
Fields iat
, exp
, and __variant
are overriden and will not be visible when the
JWT is decoded.
This panics when the serde feature is not enabled.