HasExpiration

Trait HasExpiration 

Source
pub trait HasExpiration {
    // Required method
    fn expiration(&self) -> Option<i64>;

    // Provided method
    fn is_expired(&self) -> bool { ... }
}
Available on crate feature auth only.
Expand description

Trait for claims that have an expiration time.

Required Methods§

Source

fn expiration(&self) -> Option<i64>

Get the expiration timestamp (Unix seconds).

Provided Methods§

Source

fn is_expired(&self) -> bool

Check if the claims have expired.

Implementors§