Skip to main content

token_lifetime

Function token_lifetime 

Source
pub fn token_lifetime(token: &str, now_unix: u64) -> Duration
Expand description

How long to use an access token: ACCESS_TOKEN_REUSE, or 80% of what is left of its own life if that is shorter. A token that is not a JWT gets the 20 minutes.