mirror of
https://github.com/actix/actix-extras.git
synced 2024-11-27 17:22:57 +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:
parent
433c926503
commit
abf75eeb06
@ -31,7 +31,7 @@ tracing = { version = "0.1.30", default-features = false, features = ["log"] }
|
|||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
actix-http = "3"
|
actix-http = "3"
|
||||||
actix-web = { version = "4", default-features = false, features = ["macros", "cookies", "secure-cookies"] }
|
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"
|
env_logger = "0.11"
|
||||||
reqwest = { version = "0.11", default-features = false, features = ["cookies", "json"] }
|
reqwest = { version = "0.11", default-features = false, features = ["cookies", "json"] }
|
||||||
|
@ -28,7 +28,7 @@ actix-web = { version = "4", default-features = false, features = ["cookies"] }
|
|||||||
chrono = "0.4"
|
chrono = "0.4"
|
||||||
derive_more = "0.99.7"
|
derive_more = "0.99.7"
|
||||||
log = "0.4"
|
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"
|
time = "0.3"
|
||||||
|
|
||||||
# session
|
# session
|
||||||
|
@ -2,7 +2,9 @@
|
|||||||
|
|
||||||
## Unreleased
|
## 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).
|
- Remove `redis-actor-session` crate feature (and, therefore, the `actix-redis` based storage backend).
|
||||||
|
|
||||||
## 0.9.0
|
## 0.9.0
|
||||||
|
@ -20,9 +20,9 @@ all-features = true
|
|||||||
[features]
|
[features]
|
||||||
default = []
|
default = []
|
||||||
cookie-session = []
|
cookie-session = []
|
||||||
redis-rs-session = ["redis", "rand"]
|
redis-session = ["dep:redis", "dep:rand"]
|
||||||
redis-rs-tls-session = ["redis-rs-session", "redis/tokio-native-tls-comp"]
|
redis-session-native-tls = ["redis-session", "redis/tokio-native-tls-comp"]
|
||||||
redis-rs-tls-session-rustls = ["redis-rs-session", "redis/tokio-rustls-comp"]
|
redis-session-rustls = ["redis-session", "redis/tokio-rustls-comp"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
actix-service = "2"
|
actix-service = "2"
|
||||||
@ -36,11 +36,11 @@ serde = { version = "1" }
|
|||||||
serde_json = { version = "1" }
|
serde_json = { version = "1" }
|
||||||
tracing = { version = "0.1.30", default-features = false, features = ["log"] }
|
tracing = { version = "0.1.30", default-features = false, features = ["log"] }
|
||||||
|
|
||||||
# redis-rs-session
|
# redis-session
|
||||||
redis = { version = "0.24", default-features = false, features = ["tokio-comp", "connection-manager"], optional = true }
|
redis = { version = "0.25", default-features = false, features = ["tokio-comp", "connection-manager"], optional = true }
|
||||||
|
|
||||||
[dev-dependencies]
|
[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-test = "0.1.0-beta.10"
|
||||||
actix-web = { version = "4", default-features = false, features = ["cookies", "secure-cookies", "macros"] }
|
actix-web = { version = "4", default-features = false, features = ["cookies", "secure-cookies", "macros"] }
|
||||||
tracing-subscriber = {version = "0.3", features = ["env-filter"]}
|
tracing-subscriber = {version = "0.3", features = ["env-filter"]}
|
||||||
@ -48,8 +48,8 @@ tracing = "0.1.30"
|
|||||||
|
|
||||||
[[example]]
|
[[example]]
|
||||||
name = "basic"
|
name = "basic"
|
||||||
required-features = ["redis-rs-session"]
|
required-features = ["redis-session"]
|
||||||
|
|
||||||
[[example]]
|
[[example]]
|
||||||
name = "authentication"
|
name = "authentication"
|
||||||
required-features = ["redis-rs-session"]
|
required-features = ["redis-session"]
|
||||||
|
@ -100,28 +100,28 @@ By default, `actix-session` does not provide any storage backend to retrieve and
|
|||||||
actix-session = { version = "...", features = ["cookie-session"] }
|
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
|
```toml
|
||||||
[dependencies]
|
[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
|
```toml
|
||||||
[dependencies]
|
[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
|
```toml
|
||||||
[dependencies]
|
[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.
|
You can implement your own session storage backend using the [`SessionStore`] trait.
|
||||||
|
@ -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
|
- 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
|
```toml
|
||||||
[dependencies]
|
[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):
|
connection (via the `native-tls` crate):
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[dependencies]
|
[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
|
```toml
|
||||||
[dependencies]
|
[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.
|
You can implement your own session storage backend using the [`SessionStore`] trait.
|
||||||
|
@ -11,13 +11,13 @@ pub use self::{
|
|||||||
#[cfg(feature = "cookie-session")]
|
#[cfg(feature = "cookie-session")]
|
||||||
mod cookie;
|
mod cookie;
|
||||||
|
|
||||||
#[cfg(feature = "redis-rs-session")]
|
#[cfg(feature = "redis-session")]
|
||||||
mod redis_rs;
|
mod redis_rs;
|
||||||
|
|
||||||
#[cfg(feature = "redis-rs-session")]
|
#[cfg(feature = "redis-session")]
|
||||||
mod utils;
|
mod utils;
|
||||||
|
|
||||||
#[cfg(feature = "cookie-session")]
|
#[cfg(feature = "cookie-session")]
|
||||||
pub use cookie::CookieSessionStore;
|
pub use cookie::CookieSessionStore;
|
||||||
#[cfg(feature = "redis-rs-session")]
|
#[cfg(feature = "redis-session")]
|
||||||
pub use redis_rs::{RedisSessionStore, RedisSessionStoreBuilder};
|
pub use redis_rs::{RedisSessionStore, RedisSessionStoreBuilder};
|
||||||
|
14
justfile
14
justfile
@ -1,13 +1,25 @@
|
|||||||
# depends on:
|
# depends on:
|
||||||
# - https://crates.io/crates/fd-find
|
# - https://crates.io/crates/fd-find
|
||||||
# - https://crates.io/crates/cargo-check-external-types
|
# - https://crates.io/crates/cargo-check-external-types
|
||||||
|
|
||||||
_list:
|
_list:
|
||||||
@just --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.
|
# Format workspace.
|
||||||
fmt: update-readmes
|
fmt: update-readmes
|
||||||
cargo +nightly fmt
|
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 from crate root documentation.
|
||||||
update-readmes:
|
update-readmes:
|
||||||
|
Loading…
Reference in New Issue
Block a user