Compare commits

..
Author SHA1 Message Date
phoenix 8e91af657e Add SongEvent (#9)
simodels Build / Clippy (push) Successful in 19s
simodels Build / Check (push) Successful in 24s
simodels Build / build (push) Successful in 24s
simodels Build / Rustfmt (push) Successful in 26s
simodels Build / Test Suite (push) Successful in 27s
Release Tagging / release (push) Successful in 30s
Reviewed-on: http://git.kundeng.us/phoenix/simodels/pulls/9
2026-11-05 16:03:21 -05:00
2 changed files with 5 additions and 3 deletions

No files matched your search

+4
View File
@@ -25,6 +25,10 @@ pub mod access_level {
pub const PRIVATE: &str = "PRIVATE";
}
pub mod token {
pub const TOKEN_TYPE: &str = "JWT";
}
pub mod error {
pub const DIRECTORY_NOT_INITIALIZED: &str = "Directory has not been initialized";
pub const FILENAME_NOT_INITIALIZED: &str = "Filename has not bee initialized";
+1 -3
View File
@@ -111,15 +111,13 @@ pub struct TokenResource {
pub id: uuid::Uuid,
}
const TOKEN_TYPE: &str = "JWT";
pub fn create_token(
key: &String,
token_resource: &TokenResource,
duration: time::Duration,
) -> Result<(String, i64), josekit::JoseError> {
let mut header = josekit::jws::JwsHeader::new();
header.set_token_type(TOKEN_TYPE);
header.set_token_type(super::constants::token::TOKEN_TYPE);
let mut payload = josekit::jwt::JwtPayload::new();
let message = &token_resource.message;