-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
661497b
commit c923879
Showing
5 changed files
with
29 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
//! Constants | ||
use lazy_static::lazy_static; | ||
|
||
lazy_static! { | ||
pub(crate) static ref DOMAIN: String = | ||
std::env::var("DOMAIN").expect("DOMAIN is not set in env"); | ||
} | ||
|
||
// for authorized sessions | ||
pub(crate) const SESSION_COOKIE_NAME: &str = "msessid"; | ||
pub(crate) const SESSION_KEY_PREFIX: &str = "session:"; | ||
pub(crate) const SESSION_DURATION_SECS: usize = 1209600; | ||
|
||
// for user verify requests | ||
pub(crate) const VERIFY_KEY_PREFIX: &str = "verify:"; | ||
pub(crate) const VERIFY_EXPIRY_SECONDS: usize = 86400; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters