Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
maxcountryman committed Sep 24, 2023
1 parent f940b0b commit abfebe2
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "tower-sessions"
description = "🥠 Cookie-based sessions as a `tower` middleware."
description = "🥠 Sessions as a `tower` middleware."
version = "0.0.0"
edition = "2021"
license = "MIT"
Expand Down
28 changes: 20 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
</h1>

<p align="center">
🥠 Cookie-based sessions as a `tower` middleware.
🥠 Sessions as a `tower` middleware.
</p>

<div align="center">
Expand All @@ -23,13 +23,25 @@

## 🎨 Overview

This crate provides cookie-based sessions as a `tower` middleware.

- Wraps `tower-cookies` for ergonomic and correct cookie management
- Decouples sessions from their storage via `SessionStore`
- `Session` works as an extractor when using `axum`
- Redis and SQLx stores provided via feature flags
- Works directly with types that implement `Serialize` and `Deserialize`
This crate provides sessions, key-value pairs associated with a site
visitor, as a `tower` middleware.

It offers:

- **Pluggable storage backends.** Arbitrary storage backends are implemented
with the `SessionStore` trait.
- **`axum` extractor for `Session`.** Applications built with `axum` can
use `Session` as an
extractor directly in their handlers.
- **Common backends out-of-the-box.** `RedisStore` and SQLx
(`SqliteStore`, `PostgresStore`, `MySqlStore`) are available via
their respective feature flags.
- **A simple key-value interface.** Rust types are natively supported
provided they are `impl
Serialize` and can be safely converted to JSON.
- **Strongly-typed sessions.** Strong typing guarantees are easy to layer on
top of this
foundational key-value interface.

## 📦 Install

Expand Down

0 comments on commit abfebe2

Please sign in to comment.