rusty-bever/src/lib.rs

18 lines
443 B
Rust
Raw Normal View History

2021-08-20 23:09:22 +02:00
#[macro_use]
extern crate diesel;
2021-08-22 16:24:59 +02:00
pub mod db;
2021-08-20 23:09:22 +02:00
pub mod auth;
pub mod errors;
pub(crate) mod schema;
2021-08-21 15:58:51 +02:00
pub use errors::Result;
2021-08-21 22:21:42 +02:00
// Any import defaults are defined here
/// Expire time for the JWT tokens in seconds.
2021-08-22 13:14:19 +02:00
const JWT_EXP_SECONDS: i64 = 600;
2021-08-21 22:21:42 +02:00
/// Amount of bytes the refresh tokens should consist of
const REFRESH_TOKEN_N_BYTES: usize = 64;
/// Expire time for refresh tokens; here: one week
const REFRESH_TOKEN_EXP_SECONDS: i64 = 604800;