Updating reference
This commit is contained in:
@@ -8,8 +8,8 @@ use time;
|
|||||||
|
|
||||||
pub const KEY_ENV: &str = "SECRET_KEY";
|
pub const KEY_ENV: &str = "SECRET_KEY";
|
||||||
pub const MESSAGE: &str = "Something random";
|
pub const MESSAGE: &str = "Something random";
|
||||||
pub const ISSUER: &str = "textsender_auth";
|
pub const ISSUER: &str = "schedtxt_auth";
|
||||||
pub const AUDIENCE: &str = "textsender";
|
pub const AUDIENCE: &str = "schedtxt";
|
||||||
|
|
||||||
pub fn get_expiration(issued: &time::OffsetDateTime) -> Result<time::OffsetDateTime, time::Error> {
|
pub fn get_expiration(issued: &time::OffsetDateTime) -> Result<time::OffsetDateTime, time::Error> {
|
||||||
let duration_expire = time::Duration::hours(4);
|
let duration_expire = time::Duration::hours(4);
|
||||||
@@ -78,9 +78,9 @@ pub fn extract_id_from_token(key: &str, token: &str) -> Result<uuid::Uuid, std::
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub const APP_TOKEN_TYPE: &str = "Textsender_App";
|
pub const APP_TOKEN_TYPE: &str = "Schedtxt_App";
|
||||||
pub const APP_SUBJECT: &str = "Something random";
|
pub const APP_SUBJECT: &str = "Something random";
|
||||||
pub const SERVICE_TOKEN_TYPE: &str = "Textsender_Service";
|
pub const SERVICE_TOKEN_TYPE: &str = "Schedtxt_Service";
|
||||||
pub const SERVICE_SUBJECT: &str = "Service random";
|
pub const SERVICE_SUBJECT: &str = "Service random";
|
||||||
|
|
||||||
pub fn get_token_type(key: &str, token: &str) -> Result<String, std::io::Error> {
|
pub fn get_token_type(key: &str, token: &str) -> Result<String, std::io::Error> {
|
||||||
|
|||||||
Reference in New Issue
Block a user