Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(session): add rustls (actix#342) #402

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions actix-session/CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Unreleased

- Added support for using `rustls` in `actix-session` instead of `native-tls`
- Remove `redis-actor-session` crate feature (and, therefore, the `actix-redis` based storage backend).

## 0.9.0
Expand Down
1 change: 1 addition & 0 deletions actix-session/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ default = []
cookie-session = []
redis-rs-session = ["redis", "rand"]
redis-rs-tls-session = ["redis-rs-session", "redis/tokio-native-tls-comp"]
redis-rs-tls-session-rustls = ["redis-rs-session", "redis/tokio-rustls-comp"]

[dependencies]
actix-service = "2"
Expand Down
8 changes: 8 additions & 0 deletions actix-session/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,14 @@ By default, `actix-session` does not provide any storage backend to retrieve and
actix-session = { version = "...", features = ["redis-rs-session", "redis-rs-tls-session"] }
```

If you instead prefer using `rustls`, use the `redis-rs-tls-session-rustls` feature flag:

```toml
[dependencies]
# ...
actix-session = { version = "...", features = ["redis-rs-session", "redis-rs-tls-session-rustls"] }
```

You can implement your own session storage backend using the [`SessionStore`] trait.

[`SessionStore`]: storage::SessionStore
Expand Down
2 changes: 1 addition & 1 deletion actix-session/src/storage/redis_rs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ use crate::storage::{
/// ```
///
/// # TLS support
/// Add the `redis-rs-tls-session` feature flag to enable TLS support. You can then establish a TLS
/// Add the `redis-rs-tls-session` or `redis-rs-tls-session-rustls` feature flag to enable TLS support. You can then establish a TLS
/// connection to Redis using the `rediss://` URL scheme:
///
/// ```no_run
Expand Down