2021-08-20 23:09:22 +02:00
|
|
|
#[macro_use]
|
|
|
|
extern crate diesel;
|
|
|
|
|
|
|
|
pub mod auth;
|
|
|
|
pub mod errors;
|
2021-08-22 15:50:58 +02:00
|
|
|
pub mod admin;
|
|
|
|
pub mod models;
|
2021-08-20 23:09:22 +02:00
|
|
|
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;
|