diff --git a/CHANGELOG.md b/CHANGELOG.md index 3947be7..4e1713b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +## 0.3.0 (7. July, 2023) +### Changed +- Updated to axum_session 0.3.0. + ## 0.2.1 (5. May, 2023) ### Fixed - RUSTSEC-2020-0071 from chrono. (damccull) diff --git a/Cargo.toml b/Cargo.toml index 13d8b57..54abfef 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,7 @@ members = [ [package] name = "axum_session_auth" -version = "0.2.1" +version = "0.3.0" authors = ["Andrew Wheeler "] description = "Library to Provide a User Authentication and privilege Token Checks. It requires the Axum_Session library." edition = "2021" @@ -37,28 +37,29 @@ surrealdb-fdb-6_3 = ["axum_session/surrealdb-fdb-6_3"] surrealdb-fdb-7_0 = ["axum_session/surrealdb-fdb-7_0"] surrealdb-fdb-7_1 = ["axum_session/surrealdb-fdb-7_1"] surrealdb-mem = ["axum_session/surrealdb-mem"] +key-store = ["axum_session/key-store"] [dependencies] -axum-core = "0.3.2" -async-trait = "0.1.66" -anyhow = "1.0.69" -async-recursion = "1.0.2" +axum-core = "0.3.4" +async-trait = "0.1.71" +anyhow = "1.0.71" +async-recursion = "1.0.4" http = "0.2.9" tower-layer = "0.3.2" tower-service = "0.3.2" -futures = "0.3.26" +futures = "0.3.28" bytes = "1.4.0" http-body = "0.4.5" dashmap = "5.4.0" -chrono = { version = "0.4.24", default-features = false, features = ["clock", "serde", "std"] } -tokio = { version = "1.26.0", features = ["full"] } -serde = "1.0.155" +chrono = { version = "0.4.26", default-features = false, features = ["clock", "serde", "std"] } +tokio = { version = "1.29.1", features = ["full"] } +serde = "1.0.167" [dependencies.axum_session] #path = "D:/Sources/AxumSessions" #git = "https://github.com/AscendingCreations/AxumSessions.git" #branch = "axum0.6" -version = "0.2.2" +version = "0.3.0" default-features = false [package.metadata.docs.rs] diff --git a/README.md b/README.md index 7231615..14f60fe 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ If you need help with this library or have suggestions please go to our [Discord # Cargo.toml [dependencies] # Postgres + rustls -axum_session_auth = { version = "0.2.0", features = [ "postgres-rustls" ] } +axum_session_auth = { version = "0.3.0", features = [ "postgres-rustls" ] } ``` #### Cargo Feature Flags diff --git a/example/Cargo.toml b/example/Cargo.toml index 27f35d2..506ad33 100644 --- a/example/Cargo.toml +++ b/example/Cargo.toml @@ -5,24 +5,23 @@ authors = ["Andrew Wheeler "] edition = "2021" [dependencies] -axum = {version = "0.6.1"} -tokio = { version = "1.21.2", features = ["full", "tracing"] } -async-trait = "0.1.58" -sqlx = { version = "0.6.2", features = [ +axum = {version = "0.6.18"} +tokio = { version = "1.29.1", features = ["full", "tracing"] } +async-trait = "0.1.71" +sqlx = { version = "0.7.0", features = [ "macros", - "offline", "migrate", - "mssql", "postgres", "sqlite", - "all-types", - "runtime-tokio-rustls", + "_unstable-all-types", + "tls-rustls", + "runtime-tokio", ] } -anyhow = "1.0.66" -serde = "1.0.147" +anyhow = "1.0.71" +serde = "1.0.167" [dependencies.axum_session] -version = "0.2.0" +version = "0.3.0" features = ["sqlite-rustls"] [dependencies.axum_session_auth] diff --git a/example/src/main.rs b/example/src/main.rs index 4280632..f5314e1 100644 --- a/example/src/main.rs +++ b/example/src/main.rs @@ -126,7 +126,7 @@ impl User { sqlx::query( r#" INSERT INTO users - (id, anonymous, username) SELECT 2, true, 'Test' + (id, anonymous, username) SELECT 2, false, 'Test' ON CONFLICT(id) DO UPDATE SET anonymous = EXCLUDED.anonymous, username = EXCLUDED.username @@ -182,7 +182,9 @@ async fn main() { let session_config = SessionConfig::default().with_table_name("test_table"); let auth_config = AuthConfig::::default().with_anonymous_user_id(Some(1)); let session_store = - SessionStore::::new(Some(pool.clone().into()), session_config); + SessionStore::::new(Some(pool.clone().into()), session_config) + .await + .unwrap(); //Create the Database table for storing our Session Data. session_store.initiate().await.unwrap();