pub enum AuthData<T: Serialize + DeserializeOwned = ()> {
    None,
    Text(String),
    Number(f64),
    TextNumber(Stringf64),
    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(Stringf64)

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.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.