Skip to main content

Clock

Trait Clock 

Source
pub trait Clock: Send + Sync {
    // Required method
    fn now_unix_seconds(&self) -> Result<i64>;
}
Expand description

Time source used by token issuance and validation.

Required Methods§

Source

fn now_unix_seconds(&self) -> Result<i64>

Returns the current Unix timestamp in seconds.

§Errors

Returns AuthError if the system clock cannot be represented.

Implementors§