diff --git a/Cargo.toml b/Cargo.toml index a6dc9d5..65b38e4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,6 +2,12 @@ name = "tower-sessions-file-store" version = "0.1.0" edition = "2021" +description = "Store sessions for Tower Session store on the file system" +license = "MIT" +keywords = ["axum", "sessions", "cookie", "tower"] +categories = ["asynchronous", "network-programming", "web-programming"] +repository = "https://github.com/mousetail/tower-sessions-file-store" +readme = "./readme.md" [dependencies] async-trait = "0.1.83" diff --git a/LICENCE b/LICENCE new file mode 100644 index 0000000..13868f2 --- /dev/null +++ b/LICENCE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 Patrick Recher + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/readme.md b/readme.md index 40baa24..675ad78 100644 --- a/readme.md +++ b/readme.md @@ -3,10 +3,7 @@ ```rs let session_store = FileSessionStorage::new(); let session_layer = SessionManagerLayer::new(session_store) - .with_secure(false) - .with_same_site(tower_sessions::cookie::SameSite::Lax) - .with_name("yq_session_store_id") - .with_expiry(Expiry::OnInactivity(Duration::days(360))); + .with_expiry(Expiry::OnInactivity(Duration::secs(60 * 60))); let deletion_task = tokio::task::spawn( session_store .clone()