Add users authentication routes
This commit is contained in:
15
matrixgw_backend/src/constants.rs
Normal file
15
matrixgw_backend/src/constants.rs
Normal file
@@ -0,0 +1,15 @@
|
||||
/// Auth header
|
||||
pub const API_AUTH_HEADER: &str = "x-client-auth";
|
||||
|
||||
/// Max token validity, in seconds
|
||||
pub const API_TOKEN_JWT_MAX_DURATION: u64 = 15 * 60;
|
||||
|
||||
/// Session-specific constants
|
||||
pub mod sessions {
|
||||
/// OpenID auth session state key
|
||||
pub const OIDC_STATE_KEY: &str = "oidc-state";
|
||||
/// OpenID auth remote IP address
|
||||
pub const OIDC_REMOTE_IP: &str = "oidc-remote-ip";
|
||||
/// Authenticated ID
|
||||
pub const USER_ID: &str = "uid";
|
||||
}
|
||||
Reference in New Issue
Block a user