Update packages (#15)
Rust Build / Rustfmt (push) Successful in 59s
Rust Build / Test Suite (push) Successful in 1m50s
Rust Build / Clippy (push) Successful in 1m12s
Rust Build / Check (push) Successful in 2m30s
Rust Build / build (push) Successful in 1m45s

Reviewed-on: phoenix/textsender_auth#15
This commit was merged in pull request #15.
This commit is contained in:
2026-06-13 19:06:51 -04:00
parent e9b59fc1dd
commit 7d2faba4f2
3 changed files with 9 additions and 9 deletions
Generated
+3 -3
View File
@@ -2212,7 +2212,7 @@ dependencies = [
[[package]]
name = "textsender_auth"
version = "0.1.22"
version = "0.1.23"
dependencies = [
"argon2",
"async-std",
@@ -2239,8 +2239,8 @@ dependencies = [
[[package]]
name = "textsender_models"
version = "0.3.1"
source = "git+ssh://git@git.kundeng.us/phoenix/textsender_models.git?tag=v0.3.1#ba998096cb5d35dae8e627136a795c4d9af5c8f5"
version = "0.3.3"
source = "git+ssh://git@git.kundeng.us/phoenix/textsender_models.git?tag=v0.3.3#c09fa36b15601b37f65b8baac0d479c30d2c1e44"
dependencies = [
"const_format",
"dotenvy",
+2 -2
View File
@@ -1,6 +1,6 @@
[package]
name = "textsender_auth"
version = "0.1.22"
version = "0.1.23"
edition = "2024"
rust-version = "1.95"
@@ -21,7 +21,7 @@ time = { version = "0.3.47", features = ["macros", "serde"] }
josekit = { version = "0.10.3" }
utoipa = { version = "5.5.0", features = ["axum_extras"] }
utoipa-swagger-ui = { version = "9.0.2", features = ["axum"] }
textsender_models = { git = "ssh://git@git.kundeng.us/phoenix/textsender_models.git", tag = "v0.3.1" }
textsender_models = { git = "ssh://git@git.kundeng.us/phoenix/textsender_models.git", tag = "v0.3.3" }
[dev-dependencies]
http-body-util = { version = "0.1.3" }
+4 -4
View File
@@ -24,7 +24,7 @@ pub fn create_token(
message: String::from(MESSAGE),
issuer: String::from(ISSUER),
audiences: vec![String::from(AUDIENCE)],
id: *id,
user_id: *id,
};
textsender_models::token::create_token(provided_key, &resource, time::Duration::hours(4))
}
@@ -37,7 +37,7 @@ pub fn create_service_token(
message: String::from(SERVICE_SUBJECT),
issuer: String::from(ISSUER),
audiences: vec![String::from(AUDIENCE)],
id: *id,
user_id: *id,
};
textsender_models::token::create_token(provided, &resource, time::Duration::hours(1))
}
@@ -50,7 +50,7 @@ pub fn create_service_refresh_token(
message: String::from(SERVICE_SUBJECT),
issuer: String::from(ISSUER),
audiences: vec![String::from(AUDIENCE)],
id: *id,
user_id: *id,
};
textsender_models::token::create_token(key, &resource, time::Duration::hours(4))
}
@@ -67,7 +67,7 @@ pub fn verify_token(key: &String, token: &String) -> bool {
pub fn extract_id_from_token(key: &String, token: &String) -> Result<uuid::Uuid, std::io::Error> {
match get_payload(key, token) {
Ok((payload, _header)) => match payload.claim("id") {
Ok((payload, _header)) => match payload.claim("user_id") {
Some(id) => match uuid::Uuid::parse_str(id.as_str().unwrap()) {
Ok(extracted) => Ok(extracted),
Err(err) => Err(std::io::Error::other(err.to_string())),