1
0
mirror of https://github.com/actix/actix-extras.git synced 2024-11-23 15:51:06 +01:00

build(deps): update redis requirement from 0.24 to 0.25 (#412)

* build(deps): update redis requirement from 0.24 to 0.25

Updates the requirements on [redis](https://github.com/redis-rs/redis-rs) to permit the latest version.
- [Release notes](https://github.com/redis-rs/redis-rs/releases)
- [Commits](https://github.com/redis-rs/redis-rs/compare/redis-0.24.0...redis-0.25.0)

---
updated-dependencies:
- dependency-name: redis
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* refactor(session): rename TLS features

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Rob Ede <robjtede@icloud.com>
This commit is contained in:
dependabot[bot] 2024-06-09 22:29:13 +00:00 committed by GitHub
parent 433c926503
commit abf75eeb06
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 41 additions and 27 deletions

View File

@ -31,7 +31,7 @@ tracing = { version = "0.1.30", default-features = false, features = ["log"] }
[dev-dependencies]
actix-http = "3"
actix-web = { version = "4", default-features = false, features = ["macros", "cookies", "secure-cookies"] }
actix-session = { version = "0.9", features = ["redis-rs-session", "cookie-session"] }
actix-session = { version = "0.9", features = ["redis-session", "cookie-session"] }
env_logger = "0.11"
reqwest = { version = "0.11", default-features = false, features = ["cookies", "json"] }

View File

@ -28,7 +28,7 @@ actix-web = { version = "4", default-features = false, features = ["cookies"] }
chrono = "0.4"
derive_more = "0.99.7"
log = "0.4"
redis = { version = "0.24", default-features = false, features = ["tokio-comp"] }
redis = { version = "0.25", default-features = false, features = ["tokio-comp"] }
time = "0.3"
# session

View File

@ -2,7 +2,9 @@
## Unreleased
- Added support for using `rustls` in `actix-session` instead of `native-tls`
- Add `redis-session-rustls` crate feature that enables `rustls`-secured Redis sessions.
- Rename `redis-rs-session` crate feature to `redis-session`.
- Rename `redis-rs-tls-session` crate feature to `redis-session-native-tls`.
- Remove `redis-actor-session` crate feature (and, therefore, the `actix-redis` based storage backend).
## 0.9.0

View File

@ -20,9 +20,9 @@ all-features = true
[features]
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"]
redis-session = ["dep:redis", "dep:rand"]
redis-session-native-tls = ["redis-session", "redis/tokio-native-tls-comp"]
redis-session-rustls = ["redis-session", "redis/tokio-rustls-comp"]
[dependencies]
actix-service = "2"
@ -36,11 +36,11 @@ serde = { version = "1" }
serde_json = { version = "1" }
tracing = { version = "0.1.30", default-features = false, features = ["log"] }
# redis-rs-session
redis = { version = "0.24", default-features = false, features = ["tokio-comp", "connection-manager"], optional = true }
# redis-session
redis = { version = "0.25", default-features = false, features = ["tokio-comp", "connection-manager"], optional = true }
[dev-dependencies]
actix-session = { path = ".", features = ["cookie-session", "redis-rs-session"] }
actix-session = { path = ".", features = ["cookie-session", "redis-session"] }
actix-test = "0.1.0-beta.10"
actix-web = { version = "4", default-features = false, features = ["cookies", "secure-cookies", "macros"] }
tracing-subscriber = {version = "0.3", features = ["env-filter"]}
@ -48,8 +48,8 @@ tracing = "0.1.30"
[[example]]
name = "basic"
required-features = ["redis-rs-session"]
required-features = ["redis-session"]
[[example]]
name = "authentication"
required-features = ["redis-rs-session"]
required-features = ["redis-session"]

View File

@ -100,28 +100,28 @@ By default, `actix-session` does not provide any storage backend to retrieve and
actix-session = { version = "...", features = ["cookie-session"] }
```
- a Redis-based backend via [`redis-rs`](https://docs.rs/redis-rs), [`RedisSessionStore`], using the `redis-rs-session` feature flag.
- a Redis-based backend via [`redis-rs`](https://docs.rs/redis-rs), [`RedisSessionStore`], using the `redis-session` feature flag.
```toml
[dependencies]
# ...
actix-session = { version = "...", features = ["redis-rs-session"] }
actix-session = { version = "...", features = ["redis-session"] }
```
Add the `redis-rs-tls-session` feature flag if you want to connect to Redis using a secured connection (via the `native-tls` crate):
Add the `redis-session-native-tls` feature flag if you want to connect to Redis using a secured connection (via the `native-tls` crate):
```toml
[dependencies]
# ...
actix-session = { version = "...", features = ["redis-rs-tls-session"] }
actix-session = { version = "...", features = ["redis-session-native-tls"] }
```
If you instead prefer depending on `rustls`, use the `redis-rs-tls-session-rustls` feature flag:
If you instead prefer depending on `rustls`, use the `redis-session-rustls` feature flag:
```toml
[dependencies]
# ...
actix-session = { version = "...", features = ["redis-rs-tls-session-rustls"] }
actix-session = { version = "...", features = ["redis-session-rustls"] }
```
You can implement your own session storage backend using the [`SessionStore`] trait.

View File

@ -107,29 +107,29 @@ attached to your sessions. You can enable:
```
- a Redis-based backend via [`redis-rs`](https://docs.rs/redis-rs), [`RedisSessionStore`], using
the `redis-rs-session` feature flag.
the `redis-session` feature flag.
```toml
[dependencies]
# ...
actix-session = { version = "...", features = ["redis-rs-session"] }
actix-session = { version = "...", features = ["redis-session"] }
```
Add the `redis-rs-tls-session` feature flag if you want to connect to Redis using a secured
Add the `redis-session-native-tls` feature flag if you want to connect to Redis using a secured
connection (via the `native-tls` crate):
```toml
[dependencies]
# ...
actix-session = { version = "...", features = ["redis-rs-tls-session"] }
actix-session = { version = "...", features = ["redis-session-native-tls"] }
```
If you instead prefer depending on `rustls`, use the `redis-rs-tls-session-rustls` feature flag:
If you instead prefer depending on `rustls`, use the `redis-session-rustls` feature flag:
```toml
[dependencies]
# ...
actix-session = { version = "...", features = ["redis-rs-tls-session-rustls"] }
actix-session = { version = "...", features = ["redis-session-rustls"] }
```
You can implement your own session storage backend using the [`SessionStore`] trait.

View File

@ -11,13 +11,13 @@ pub use self::{
#[cfg(feature = "cookie-session")]
mod cookie;
#[cfg(feature = "redis-rs-session")]
#[cfg(feature = "redis-session")]
mod redis_rs;
#[cfg(feature = "redis-rs-session")]
#[cfg(feature = "redis-session")]
mod utils;
#[cfg(feature = "cookie-session")]
pub use cookie::CookieSessionStore;
#[cfg(feature = "redis-rs-session")]
#[cfg(feature = "redis-session")]
pub use redis_rs::{RedisSessionStore, RedisSessionStoreBuilder};

View File

@ -1,13 +1,25 @@
# depends on:
# - https://crates.io/crates/fd-find
# - https://crates.io/crates/cargo-check-external-types
_list:
@just --list
msrv := ```
cargo metadata --format-version=1 \
| jq -r 'first(.packages[] | select(.source == null and .rust_version)) | .rust_version' \
| sed -E 's/^1\.([0-9]{2})$/1\.\1\.0/'
```
msrv_rustup := "+" + msrv
# Run Clippy over workspace.
clippy toolchain="":
cargo {{ toolchain }} clippy --workspace --all-targets --all-features
# Format workspace.
fmt: update-readmes
cargo +nightly fmt
npx -y prettier --write $(fd --hidden --extension=yml --extension=md)
fd --hidden --extension=yml --extension=md --exec-batch npx -y prettier --write
# Update READMEs from crate root documentation.
update-readmes: