actix_jwt_session

Trait Claims

Source
pub trait Claims:
    PartialEq
    + DeserializeOwned
    + Serialize
    + Clone
    + Send
    + Sync
    + Debug
    + 'static {
    // Required methods
    fn jti(&self) -> Uuid;
    fn subject(&self) -> &str;
}
Expand description

Serializable and storable struct which represent JWT claims

  • It must have JWT ID as uuid::Uuid
  • It must have subject as a String

Required Methods§

Source

fn jti(&self) -> Uuid

Unique token identifier

Source

fn subject(&self) -> &str

Login, email or other identifier

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§