diff --git a/rocket/jwt-authentication/src/claims.rs b/rocket/jwt-authentication/src/claims.rs index dde34121..0ddd281e 100644 --- a/rocket/jwt-authentication/src/claims.rs +++ b/rocket/jwt-authentication/src/claims.rs @@ -18,7 +18,8 @@ const SECRET: &str = "secret"; lazy_static! { /// Time before token expires (aka exp claim) - static ref TOKEN_EXPIRATION: Duration = Duration::minutes(5); + static ref TOKEN_EXPIRATION: Duration = Duration::try_minutes(5) + .expect("failed to create an expiration duration"); } // Used when decoding a token to `Claims`