diff --git a/examples/axum-app/app/Cargo.toml b/examples/axum-app/app/Cargo.toml
index cb5ab9a..df22dbb 100644
--- a/examples/axum-app/app/Cargo.toml
+++ b/examples/axum-app/app/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "axum-app"
-version = "0.2.1"
+version = "0.2.2"
rust-version = "1.68"
edition = "2021"
publish = false
diff --git a/examples/axum-app/config/config.dev.toml b/examples/axum-app/config/config.dev.toml
index d09bdf5..5491826 100644
--- a/examples/axum-app/config/config.dev.toml
+++ b/examples/axum-app/config/config.dev.toml
@@ -1,6 +1,6 @@
name = "data-cube"
-version = "1.0.2"
+version = "0.2.2"
[main]
host = "127.0.0.1"
@@ -22,6 +22,9 @@ namespace = "dc"
[[postgres]]
host = "localhost"
port = 5432
-user = "postgres"
-password = "postgres"
database = "data_cube"
+user = "postgres"
+password = "QAx01wnh1i5ER713zfHmZi6dIUYn/Iq9ag+iUGtvKzEFJFYW"
+
+[tracing]
+filter = "sqlx=trace,tower_http=trace,zino=trace,zino_core=trace"
\ No newline at end of file
diff --git a/examples/axum-app/config/config.prod.toml b/examples/axum-app/config/config.prod.toml
index 0157dd5..c637254 100644
--- a/examples/axum-app/config/config.prod.toml
+++ b/examples/axum-app/config/config.prod.toml
@@ -1,6 +1,6 @@
name = "data-cube"
-version = "1.0.2"
+version = "0.2.2"
[main]
host = "127.0.0.1"
@@ -22,9 +22,9 @@ namespace = "dc"
[[postgres]]
host = "localhost"
port = 5432
-user = "postgres"
-password = "postgres"
database = "data_cube"
+user = "postgres"
+password = "G76hTg8T5Aa+SZQFc+0QnsRLo1UOjqpkp/jUQ+lySc8QCt4B"
[tracing]
-filter = "warn,zino=info,zino_core=info"
\ No newline at end of file
+filter = "sqlx=warn,tower_http=info,zino=info,zino_core=info"
\ No newline at end of file
diff --git a/zino-core/Cargo.toml b/zino-core/Cargo.toml
index 0aaffe2..69aafc3 100644
--- a/zino-core/Cargo.toml
+++ b/zino-core/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "zino-core"
description = "Core types and traits for zino."
-version = "0.2.1"
+version = "0.2.2"
rust-version = "1.68"
edition = "2021"
license = "MIT"
@@ -25,7 +25,6 @@ http-types = { version = "2.12.0" }
rand = { version = "0.8.5" }
serde = { version = "1.0.152", features = ["derive"] }
serde_json = { version = "1.0.91" }
-sha-1 = { version = "0.10.1" }
sha2 = { version = "0.10.6" }
sqlx = { version = "0.6.2", features = ["runtime-tokio-native-tls", "postgres", "uuid", "time", "json"] }
time = { version = "0.3.17", features = ["local-offset", "parsing", "serde"] }
diff --git a/zino-core/src/authentication/mod.rs b/zino-core/src/authentication/mod.rs
index 8e7fb49..3ecc361 100644
--- a/zino-core/src/authentication/mod.rs
+++ b/zino-core/src/authentication/mod.rs
@@ -1,6 +1,8 @@
use crate::{DateTime, Map, Validation};
-use hmac::{Hmac, Mac};
-use sha1::Sha1;
+use hmac::{
+ digest::{FixedOutput, KeyInit, MacMarker, Update},
+ Mac,
+};
use std::time::Duration;
mod access_key;
@@ -11,7 +13,7 @@ pub use access_key::{AccessKeyId, SecretAccessKey};
pub(crate) use security_token::ParseTokenError;
pub use security_token::SecurityToken;
-/// HTTP signature using RFC 2104 HMAC-SHA1.
+/// HTTP signature using HMAC.
pub struct Authentication {
/// Service name.
service_name: String,
@@ -49,7 +51,7 @@ impl Authentication {
accept: None,
content_md5: None,
content_type: None,
- date_header: ("Date".to_string(), DateTime::now()),
+ date_header: ("date".to_string(), DateTime::now()),
expires: None,
headers: Vec::new(),
resource: String::new(),
@@ -74,25 +76,25 @@ impl Authentication {
self.signature = signature;
}
- /// Sets the `Accept` header value.
+ /// Sets the `accept` header value.
#[inline]
pub fn set_accept(&mut self, accept: impl Into