runique 1.1.25

A Django-inspired web framework for Rust with ORM, templates, and comprehensive security middleware
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// flash messages.rs
pub const FLASH_KEY: &str = "flash_messages";

// Csrf
pub const CSRF_TOKEN_KEY: &str = "csrf_token";

// csp.rs
pub const NONCE_KEY: &str = "csp_nonce";

// Clé de session pour stocker l'ID utilisateur
pub const SESSION_USER_ID_KEY: &str = "user_id";
pub const SESSION_USER_USERNAME_KEY: &str = "username";
pub const SESSION_USER_IS_STAFF_KEY: &str = "is_staff";
pub const SESSION_USER_IS_SUPERUSER_KEY: &str = "is_superuser";
pub const SESSION_USER_ROLES_KEY: &str = "roles";