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

Object Safety§

This trait is not object safe.

Implementors§