mirror of
https://github.com/actix/actix-extras.git
synced 2025-02-22 10:23:18 +01:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
0cde6caff8
5
.github/ISSUE_TEMPLATE/config.yml
vendored
5
.github/ISSUE_TEMPLATE/config.yml
vendored
@ -1,5 +0,0 @@
|
||||
blank_issues_enabled: true
|
||||
contact_links:
|
||||
- name: Gitter channel (actix)
|
||||
url: https://gitter.im/actix/actix
|
||||
about: Please ask and answer questions about the actix project here.
|
10
.github/dependabot.yml
vendored
Normal file
10
.github/dependabot.yml
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: cargo
|
||||
directory: /
|
||||
schedule:
|
||||
interval: weekly
|
||||
- package-ecosystem: github-actions
|
||||
directory: /
|
||||
schedule:
|
||||
interval: weekly
|
41
.github/workflows/ci-post-merge.yml
vendored
41
.github/workflows/ci-post-merge.yml
vendored
@ -16,10 +16,8 @@ jobs:
|
||||
matrix:
|
||||
target:
|
||||
- { name: Linux, os: ubuntu-latest, triple: x86_64-unknown-linux-gnu }
|
||||
version:
|
||||
- nightly
|
||||
|
||||
name: ${{ matrix.target.name }} / ${{ matrix.version }}
|
||||
name: ${{ matrix.target.name }} / nightly
|
||||
runs-on: ${{ matrix.target.os }}
|
||||
|
||||
services:
|
||||
@ -30,15 +28,16 @@ jobs:
|
||||
options: --entrypoint redis-server
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install Rust (${{ matrix.version }})
|
||||
uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
- name: Install Rust (nightly)
|
||||
uses: actions-rust-lang/setup-rust-toolchain@v1.5.0
|
||||
with:
|
||||
toolchain: ${{ matrix.version }}
|
||||
toolchain: nightly
|
||||
|
||||
- uses: taiki-e/cache-cargo-install-action@v1
|
||||
with: { tool: cargo-hack }
|
||||
- uses: taiki-e/install-action@v2.20.3
|
||||
with:
|
||||
tool: cargo-hack
|
||||
|
||||
- name: check minimal
|
||||
run: cargo ci-min
|
||||
@ -61,30 +60,26 @@ jobs:
|
||||
build_and_test_other_nightly:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
# prettier-ignore
|
||||
matrix:
|
||||
target:
|
||||
- { name: macOS, os: macos-latest, triple: x86_64-apple-darwin }
|
||||
- {
|
||||
name: Windows,
|
||||
os: windows-latest,
|
||||
triple: x86_64-pc-windows-msvc,
|
||||
}
|
||||
version:
|
||||
- nightly
|
||||
- { name: Windows, os: windows-latest, triple: x86_64-pc-windows-msvc }
|
||||
|
||||
name: ${{ matrix.target.name }} / ${{ matrix.version }}
|
||||
name: ${{ matrix.target.name }} / nightly
|
||||
runs-on: ${{ matrix.target.os }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install Rust (${{ matrix.version }})
|
||||
uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
- name: Install Rust (nightly)
|
||||
uses: actions-rust-lang/setup-rust-toolchain@v1.5.0
|
||||
with:
|
||||
toolchain: ${{ matrix.version }}
|
||||
toolchain: nightly
|
||||
|
||||
- uses: taiki-e/cache-cargo-install-action@v1
|
||||
with: { tool: cargo-hack }
|
||||
- uses: taiki-e/install-action@v2.20.3
|
||||
with:
|
||||
tool: cargo-hack
|
||||
|
||||
- name: check minimal
|
||||
run: cargo ci-min
|
||||
|
76
.github/workflows/ci.yml
vendored
76
.github/workflows/ci.yml
vendored
@ -1,8 +1,12 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
pull_request: {}
|
||||
push: { branches: [master] }
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened]
|
||||
merge_group:
|
||||
types: [checks_requested]
|
||||
push:
|
||||
branches: [master]
|
||||
|
||||
permissions: { contents: read }
|
||||
|
||||
@ -18,10 +22,10 @@ jobs:
|
||||
target:
|
||||
- { name: Linux, os: ubuntu-latest, triple: x86_64-unknown-linux-gnu }
|
||||
version:
|
||||
- '1.60' # MSRV
|
||||
- stable
|
||||
- { name: msrv, version: 1.68.0 }
|
||||
- { name: stable, version: stable }
|
||||
|
||||
name: ${{ matrix.target.name }} / ${{ matrix.version }}
|
||||
name: ${{ matrix.target.name }} / ${{ matrix.version.name }}
|
||||
runs-on: ${{ matrix.target.os }}
|
||||
|
||||
services:
|
||||
@ -37,21 +41,22 @@ jobs:
|
||||
--entrypoint redis-server
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install Rust (${{ matrix.version }})
|
||||
uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
- name: Install Rust (${{ matrix.version.name }})
|
||||
uses: actions-rust-lang/setup-rust-toolchain@v1.5.0
|
||||
with:
|
||||
toolchain: ${{ matrix.version }}
|
||||
toolchain: ${{ matrix.version.version }}
|
||||
|
||||
- name: Install cargo-hack
|
||||
uses: taiki-e/cache-cargo-install-action@v1
|
||||
with: { tool: cargo-hack }
|
||||
uses: taiki-e/install-action@v2.20.3
|
||||
with:
|
||||
tool: cargo-hack
|
||||
|
||||
- name: workaround MSRV issues
|
||||
if: matrix.version != 'stable'
|
||||
run: |
|
||||
cargo update -p=time:0.3.20 --precise=0.3.16
|
||||
# - name: workaround MSRV issues
|
||||
# if: matrix.version.name == 'msrv'
|
||||
# run: |
|
||||
# cargo update -p=time:0.3.20 --precise=0.3.16
|
||||
|
||||
- name: check minimal
|
||||
run: cargo ci-min
|
||||
@ -75,36 +80,34 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
# prettier-ignore
|
||||
target:
|
||||
- { name: macOS, os: macos-latest, triple: x86_64-apple-darwin }
|
||||
- {
|
||||
name: Windows,
|
||||
os: windows-latest,
|
||||
triple: x86_64-pc-windows-msvc,
|
||||
}
|
||||
- { name: Windows, os: windows-latest, triple: x86_64-pc-windows-msvc }
|
||||
version:
|
||||
- '1.60' # MSRV
|
||||
- stable
|
||||
- { name: msrv, version: 1.68.0 }
|
||||
- { name: stable, version: stable }
|
||||
|
||||
name: ${{ matrix.target.name }} / ${{ matrix.version }}
|
||||
name: ${{ matrix.target.name }} / ${{ matrix.version.name }}
|
||||
runs-on: ${{ matrix.target.os }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install Rust (${{ matrix.version }})
|
||||
uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
- name: Install Rust (${{ matrix.version.name }})
|
||||
uses: actions-rust-lang/setup-rust-toolchain@v1.5.0
|
||||
with:
|
||||
toolchain: ${{ matrix.version }}
|
||||
toolchain: ${{ matrix.version.version }}
|
||||
|
||||
- name: Install cargo-hack
|
||||
uses: taiki-e/cache-cargo-install-action@v1
|
||||
with: { tool: cargo-hack }
|
||||
uses: taiki-e/install-action@v2.20.3
|
||||
with:
|
||||
tool: cargo-hack
|
||||
|
||||
- name: workaround MSRV issues
|
||||
if: matrix.version != 'stable'
|
||||
run: |
|
||||
cargo update -p=time:0.3.20 --precise=0.3.16
|
||||
# - name: workaround MSRV issues
|
||||
# if: matrix.version.name == 'msrv'
|
||||
# run: |
|
||||
# cargo update -p=time:0.3.20 --precise=0.3.16
|
||||
|
||||
- name: check minimal
|
||||
run: cargo ci-min
|
||||
@ -128,11 +131,12 @@ jobs:
|
||||
name: doc tests
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install Rust (nightly)
|
||||
uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
with: { toolchain: nightly }
|
||||
uses: actions-rust-lang/setup-rust-toolchain@v1.5.0
|
||||
with:
|
||||
toolchain: nightly
|
||||
|
||||
- name: doc tests
|
||||
timeout-minutes: 40
|
||||
|
13
.github/workflows/coverage.yml
vendored
13
.github/workflows/coverage.yml
vendored
@ -1,7 +1,8 @@
|
||||
name: Coverage
|
||||
|
||||
on:
|
||||
push: { branches: [master] }
|
||||
push:
|
||||
branches: [master]
|
||||
|
||||
permissions: { contents: read }
|
||||
|
||||
@ -21,11 +22,12 @@ jobs:
|
||||
options: --entrypoint redis-server
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install Rust (nightly)
|
||||
uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
with: { toolchain: nightly }
|
||||
uses: actions-rust-lang/setup-rust-toolchain@v1.5.0
|
||||
with:
|
||||
toolchain: nightly
|
||||
|
||||
- name: Generate coverage file
|
||||
run: |
|
||||
@ -34,4 +36,5 @@ jobs:
|
||||
|
||||
- name: Upload to Codecov
|
||||
uses: codecov/codecov-action@v3
|
||||
with: { file: cobertura.xml }
|
||||
with:
|
||||
file: cobertura.xml
|
||||
|
27
.github/workflows/lint.yml
vendored
27
.github/workflows/lint.yml
vendored
@ -12,10 +12,10 @@ jobs:
|
||||
fmt:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install Rust (nightly)
|
||||
uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
uses: actions-rust-lang/setup-rust-toolchain@v1.5.0
|
||||
with:
|
||||
toolchain: nightly
|
||||
components: rustfmt
|
||||
@ -26,33 +26,36 @@ jobs:
|
||||
clippy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install Rust
|
||||
uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
with: { components: clippy }
|
||||
uses: actions-rust-lang/setup-rust-toolchain@v1.5.0
|
||||
with:
|
||||
components: clippy
|
||||
|
||||
- name: Check with Clippy
|
||||
run: cargo clippy --workspace --tests --all-features
|
||||
run: cargo clippy --workspace --tests --all-features -- -A unknown_lints
|
||||
|
||||
public-api-diff:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: checkout ${{ github.base_ref }}
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.base_ref }}
|
||||
|
||||
- name: checkout ${{ github.head_ref }}
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Rust (nightly)
|
||||
uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
with: { toolchain: nightly }
|
||||
uses: actions-rust-lang/setup-rust-toolchain@v1.5.0
|
||||
with:
|
||||
toolchain: nightly
|
||||
|
||||
- name: Install cargo-public-api
|
||||
uses: taiki-e/cache-cargo-install-action@v1
|
||||
with: { tool: cargo-public-api }
|
||||
uses: taiki-e/cache-cargo-install-action@v1.3.0
|
||||
with:
|
||||
tool: cargo-public-api
|
||||
|
||||
- name: generate API diff
|
||||
run: |
|
||||
|
6
.github/workflows/upload-doc.yml
vendored
6
.github/workflows/upload-doc.yml
vendored
@ -14,10 +14,10 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install Rust (nightly)
|
||||
uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
uses: actions-rust-lang/setup-rust-toolchain@v1.5.0
|
||||
with: { toolchain: nightly }
|
||||
|
||||
- name: Build Docs
|
||||
@ -27,7 +27,7 @@ jobs:
|
||||
run: echo '<meta http-equiv="refresh" content="0;url=actix_cors/index.html">' > target/doc/index.html
|
||||
|
||||
- name: Deploy to GitHub Pages
|
||||
uses: JamesIves/github-pages-deploy-action@3.7.1
|
||||
uses: JamesIves/github-pages-deploy-action@v4.4.3
|
||||
with:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
BRANCH: gh-pages
|
||||
|
@ -11,10 +11,10 @@ members = [
|
||||
"actix-web-httpauth",
|
||||
]
|
||||
|
||||
# TODO(MSRV 1.64)
|
||||
# [workspace.package]
|
||||
# edition = "2018"
|
||||
# rust-version = "1.60"
|
||||
[workspace.package]
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.68"
|
||||
|
||||
[patch.crates-io]
|
||||
actix-cors = { path = "./actix-cors" }
|
||||
|
24
README.md
24
README.md
@ -12,13 +12,13 @@
|
||||
| Crate | | |
|
||||
| -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
|
||||
| [actix-cors] | [](https://crates.io/crates/actix-cors) [](https://deps.rs/crate/actix-cors/0.6.4) | Cross-Origin Resource Sharing (CORS) controls. |
|
||||
| [actix-identity] | [](https://crates.io/crates/actix-identity) [](https://deps.rs/crate/actix-identity/0.5.2) | Identity management. |
|
||||
| [actix-limitation] | [](https://crates.io/crates/actix-limitation) [](https://deps.rs/crate/actix-limitation/0.4.0) | Rate-limiting using a fixed window counter for arbitrary keys, backed by Redis. |
|
||||
| [actix-protobuf] | [](https://crates.io/crates/actix-protobuf) [](https://deps.rs/crate/actix-protobuf/0.9.0) | Protobuf payload extractor. |
|
||||
| [actix-redis] | [](https://crates.io/crates/actix-redis) [](https://deps.rs/crate/actix-redis/0.12.0) | Actor-based Redis client. |
|
||||
| [actix-session] | [](https://crates.io/crates/actix-session) [](https://deps.rs/crate/actix-session/0.7.2) | Session management. |
|
||||
| [actix-identity] | [](https://crates.io/crates/actix-identity) [](https://deps.rs/crate/actix-identity/0.6.0) | Identity management. |
|
||||
| [actix-limitation] | [](https://crates.io/crates/actix-limitation) [](https://deps.rs/crate/actix-limitation/0.5.1) | Rate-limiting using a fixed window counter for arbitrary keys, backed by Redis. |
|
||||
| [actix-protobuf] | [](https://crates.io/crates/actix-protobuf) [](https://deps.rs/crate/actix-protobuf/0.10.0) | Protobuf payload extractor. |
|
||||
| [actix-redis] | [](https://crates.io/crates/actix-redis) [](https://deps.rs/crate/actix-redis/0.13.0) | Actor-based Redis client. |
|
||||
| [actix-session] | [](https://crates.io/crates/actix-session) [](https://deps.rs/crate/actix-session/0.8.0) | Session management. |
|
||||
| [actix-settings] | [](https://crates.io/crates/actix-settings) [](https://deps.rs/crate/actix-settings/0.6.0) | Easily manage Actix Web's settings from a TOML file and environment variables. |
|
||||
| [actix-web-httpauth] | [](https://crates.io/crates/actix-web-httpauth) [](https://deps.rs/crate/actix-web-httpauth/0.8.0) | HTTP authentication schemes. |
|
||||
| [actix-web-httpauth] | [](https://crates.io/crates/actix-web-httpauth) [](https://deps.rs/crate/actix-web-httpauth/0.8.1) | HTTP authentication schemes. |
|
||||
|
||||
---
|
||||
|
||||
@ -30,19 +30,19 @@ These crates are provided by the community.
|
||||
| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
|
||||
| [actix-web-lab] | [][actix-web-lab] [](https://deps.rs/crate/actix-web-lab/0.19.1) | Experimental extractors, middleware, and other extras for possible inclusion in Actix Web. |
|
||||
| [actix-multipart-extract] | [][actix-multipart-extract] [](https://deps.rs/crate/actix-multipart-extract/0.1.5) | Better multipart form support for Actix Web. |
|
||||
| [actix-form-data] | [][actix-form-data] [](https://deps.rs/crate/actix-form-data/0.7.0-beta.0) | Multipart form data from actix multipart streams |
|
||||
| [actix-governor] | [][actix-governor] [](https://deps.rs/crate/actix-governor/0.4.0) | Rate-limiting backed by governor. |
|
||||
| [actix-form-data] | [][actix-form-data] [](https://deps.rs/crate/actix-form-data/0.7.0-beta.4) | Multipart form data from actix multipart streams |
|
||||
| [actix-governor] | [][actix-governor] [](https://deps.rs/crate/actix-governor/0.5.1) | Rate-limiting backed by governor. |
|
||||
| [actix-casbin] | [][actix-casbin] [](https://deps.rs/crate/actix-casbin/0.4.2) | Authorization library that supports access control models like ACL, RBAC & ABAC. |
|
||||
| [actix-ip-filter] | [][actix-ip-filter] [](https://deps.rs/crate/actix-ip-filter/0.3.1) | IP address filter. Supports glob patterns. |
|
||||
| [actix-web-static-files] | [][actix-web-static-files] [](https://deps.rs/crate/actix-web-static-files/4.0.1) | Static files as embedded resources. |
|
||||
| [actix-web-grants] | [][actix-web-grants] [](https://deps.rs/crate/actix-web-grants/3.0.1) | Extension for validating user authorities. |
|
||||
| [aliri_actix] | [][aliri_actix] [](https://deps.rs/crate/aliri_actix/0.8.0) | Endpoint authorization and authentication using scoped OAuth2 JWT tokens. |
|
||||
| [actix-web-grants] | [][actix-web-grants] [](https://deps.rs/crate/actix-web-grants/3.0.2) | Extension for validating user authorities. |
|
||||
| [aliri_actix] | [][aliri_actix] [](https://deps.rs/crate/aliri_actix/0.9.0) | Endpoint authorization and authentication using scoped OAuth2 JWT tokens. |
|
||||
| [actix-web-flash-messages] | [][actix-web-flash-messages] [](https://deps.rs/crate/actix-web-flash-messages/0.4.2) | Support for flash messages/one-time notifications in `actix-web`. |
|
||||
| [awmp] | [][awmp] [](https://deps.rs/crate/awmp/0.8.1) | An easy to use wrapper around multipart fields for Actix Web. |
|
||||
| [tracing-actix-web] | [][tracing-actix-web] [](https://deps.rs/crate/tracing-actix-web/0.7.3) | A middleware to collect telemetry data from applications built on top of the actix-web framework. |
|
||||
| [tracing-actix-web] | [][tracing-actix-web] [](https://deps.rs/crate/tracing-actix-web/0.7.6) | A middleware to collect telemetry data from applications built on top of the Actix Web framework. |
|
||||
| [actix-ws] | [][actix-ws] [](https://deps.rs/crate/actix-ws/0.2.5) | Actor-less WebSockets for the Actix Runtime. |
|
||||
| [actix-hash] | [][actix-hash] [](https://deps.rs/crate/actix-hash/0.5.0) | Hashing utilities for Actix Web. |
|
||||
| [actix-bincode] |  [](https://deps.rs/crate/actix-bincode/0.2.1) | Bincode payload extractor for Actix Web |
|
||||
| [actix-bincode] |  [](https://deps.rs/crate/actix-bincode/0.2.2) | Bincode payload extractor for Actix Web |
|
||||
| [sentinel-actix] |  [](https://deps.rs/crate/sentinel-actix/0.1.0) | General and flexible protection for Actix Web |
|
||||
|
||||
To add a crate to this list, submit a pull request.
|
||||
|
@ -1,79 +1,79 @@
|
||||
# Changes
|
||||
|
||||
## Unreleased - 2022-xx-xx
|
||||
## Unreleased
|
||||
|
||||
- Minimum supported Rust version (MSRV) is now 1.60.
|
||||
- Minimum supported Rust version (MSRV) is now 1.68.
|
||||
|
||||
## 0.6.4 - 2022-10-28
|
||||
## 0.6.4
|
||||
|
||||
- Add `Cors::allow_private_network_access()` behind an unstable flag (`draft-private-network-access`). [#297]
|
||||
|
||||
[#297]: https://github.com/actix/actix-extras/pull/297
|
||||
|
||||
## 0.6.3 - 2022-09-21
|
||||
## 0.6.3
|
||||
|
||||
- Add `Cors::block_on_origin_mismatch()` option for controlling if requests are pre-emptively rejected. [#287]
|
||||
- Minimum supported Rust version (MSRV) is now 1.59 due to transitive `time` dependency.
|
||||
|
||||
[#287]: https://github.com/actix/actix-extras/pull/287
|
||||
|
||||
## 0.6.2 - 2022-08-07
|
||||
## 0.6.2
|
||||
|
||||
- Fix `expose_any_header` to return list of response headers. [#273]
|
||||
- Minimum supported Rust version (MSRV) is now 1.57 due to transitive `time` dependency.
|
||||
|
||||
[#273]: https://github.com/actix/actix-extras/pull/273
|
||||
|
||||
## 0.6.1 - 2022-03-07
|
||||
## 0.6.1
|
||||
|
||||
- Do not consider requests without a `Access-Control-Request-Method` as preflight. [#226]
|
||||
|
||||
[#226]: https://github.com/actix/actix-extras/pull/226
|
||||
|
||||
## 0.6.0 - 2022-02-25
|
||||
## 0.6.0
|
||||
|
||||
- Update `actix-web` dependency to 4.0.
|
||||
|
||||
## 0.6.0-beta.10 - 2022-02-07
|
||||
## 0.6.0-beta.10
|
||||
|
||||
- Ensure that preflight responses contain a `Vary` header. [#224]
|
||||
|
||||
[#224]: https://github.com/actix/actix-extras/pull/224
|
||||
|
||||
## 0.6.0-beta.9 - 2022-02-07
|
||||
## 0.6.0-beta.9
|
||||
|
||||
- Relax body type bounds on middleware impl. [#223]
|
||||
- Update `actix-web` dependency to `4.0.0-rc.1`.
|
||||
|
||||
[#223]: https://github.com/actix/actix-extras/pull/223
|
||||
|
||||
## 0.6.0-beta.8 - 2021-12-29
|
||||
## 0.6.0-beta.8
|
||||
|
||||
- Minimum supported Rust version (MSRV) is now 1.54.
|
||||
|
||||
## 0.6.0-beta.7 - 2021-12-18
|
||||
## 0.6.0-beta.7
|
||||
|
||||
- Update `actix-web` dependency to `4.0.0-beta.15`. [#216]
|
||||
|
||||
[#216]: https://github.com/actix/actix-extras/pull/216
|
||||
|
||||
## 0.6.0-beta.6 - 2021-12-13
|
||||
## 0.6.0-beta.6
|
||||
|
||||
- Fix panic when wrapping routes with dynamic segments in their paths. [#213]
|
||||
|
||||
[#213]: https://github.com/actix/actix-extras/pull/213
|
||||
|
||||
## 0.6.0-beta.5 - 2021-12-12 _(YANKED)_
|
||||
## 0.6.0-beta.5 _(YANKED)_
|
||||
|
||||
- Update `actix-web` dependency to `4.0.0.beta-14`. [#209]
|
||||
|
||||
[#209]: https://github.com/actix/actix-extras/pull/209
|
||||
|
||||
## 0.6.0-beta.4 - 2021-11-22
|
||||
## 0.6.0-beta.4
|
||||
|
||||
- No significant changes since `0.6.0-beta.3`.
|
||||
|
||||
## 0.6.0-beta.3 - 2021-10-21
|
||||
## 0.6.0-beta.3
|
||||
|
||||
- Make `Cors` middleware generic over body type [#195]
|
||||
- Fix `expose_any_header` behavior. [#204]
|
||||
@ -84,37 +84,37 @@
|
||||
[#203]: https://github.com/actix/actix-extras/pull/203
|
||||
[#204]: https://github.com/actix/actix-extras/pull/204
|
||||
|
||||
## 0.6.0-beta.2 - 2021-06-27
|
||||
## 0.6.0-beta.2
|
||||
|
||||
- No notable changes.
|
||||
|
||||
## 0.6.0-beta.1 - 2021-04-02
|
||||
## 0.6.0-beta.1
|
||||
|
||||
- Update `actix-web` dependency to 4.0.0 beta.
|
||||
- Minimum supported Rust version (MSRV) is now 1.46.0.
|
||||
|
||||
## 0.5.4 - 2020-12-31
|
||||
## 0.5.4
|
||||
|
||||
- Fix `expose_any_header` method, now set the correct field. [#143]
|
||||
|
||||
[#143]: https://github.com/actix/actix-extras/pull/143
|
||||
|
||||
## 0.5.3 - 2020-11-19
|
||||
## 0.5.3
|
||||
|
||||
- Fix version spec for `derive_more` dependency.
|
||||
|
||||
## 0.5.2 - 2020-11-15
|
||||
## 0.5.2
|
||||
|
||||
- Ensure `tinyvec` is using the correct features.
|
||||
- Bump `futures-util` minimum version to `0.3.7` to avoid `RUSTSEC-2020-0059`.
|
||||
|
||||
## 0.5.1 - 2020-11-05
|
||||
## 0.5.1
|
||||
|
||||
- Fix `allow_any_header` method, now set the correct field. [#121]
|
||||
|
||||
[#121]: https://github.com/actix/actix-extras/pull/121
|
||||
|
||||
## 0.5.0 - 2020-10-19
|
||||
## 0.5.0
|
||||
|
||||
- Disallow `*` in `Cors::allowed_origin`. [#114].
|
||||
- Hide `CorsMiddleware` from docs. [#118].
|
||||
@ -134,13 +134,13 @@
|
||||
[#119]: https://github.com/actix/actix-extras/pull/119
|
||||
[#120]: https://github.com/actix/actix-extras/pull/120
|
||||
|
||||
## 0.4.1 - 2020-10-07
|
||||
## 0.4.1
|
||||
|
||||
- Allow closures to be used with `allowed_origin_fn`. [#110]
|
||||
|
||||
[#110]: https://github.com/actix/actix-extras/pull/110
|
||||
|
||||
## 0.4.0 - 2020-09-27
|
||||
## 0.4.0
|
||||
|
||||
- Implement `allowed_origin_fn` builder method. [#93]
|
||||
- Use `TryInto` instead of `TryFrom` where applicable. [#106]
|
||||
@ -148,13 +148,13 @@
|
||||
[#93]: https://github.com/actix/actix-extras/pull/93
|
||||
[#106]: https://github.com/actix/actix-extras/pull/106
|
||||
|
||||
## 0.3.0 - 2020-09-11
|
||||
## 0.3.0
|
||||
|
||||
- Update `actix-web` dependency to 3.0.0.
|
||||
- Minimum supported Rust version (MSRV) is now 1.42.0.
|
||||
- Implement the Debug trait on all public types.
|
||||
|
||||
## 0.3.0-alpha.1 - 2020-03-11
|
||||
## 0.3.0-alpha.1
|
||||
|
||||
- Minimize `futures-*` dependencies
|
||||
- Update `actix-web` dependency to 3.0.0-alpha.1
|
||||
|
@ -9,9 +9,9 @@ description = "Cross-Origin Resource Sharing (CORS) controls for Actix Web"
|
||||
keywords = ["actix", "cors", "web", "security", "crossorigin"]
|
||||
homepage = "https://actix.rs"
|
||||
repository = "https://github.com/actix/actix-extras.git"
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2018"
|
||||
rust-version = "1.60"
|
||||
license.workspace = true
|
||||
edition.workspace = true
|
||||
rust-version.workspace = true
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
rustdoc-args = ["--cfg", "docsrs"]
|
||||
@ -25,10 +25,10 @@ actix-utils = "3"
|
||||
actix-web = { version = "4", default-features = false }
|
||||
|
||||
derive_more = "0.99.7"
|
||||
futures-util = { version = "0.3.7", default-features = false }
|
||||
futures-util = { version = "0.3.17", default-features = false, features = ["std"] }
|
||||
log = "0.4"
|
||||
once_cell = "1"
|
||||
smallvec = "1.6.1"
|
||||
smallvec = "1"
|
||||
|
||||
[dev-dependencies]
|
||||
actix-web = { version = "4", default-features = false, features = ["macros"] }
|
||||
|
@ -1,25 +1,27 @@
|
||||
# Changes
|
||||
|
||||
## Unreleased - 2022-xx-xx
|
||||
## Unreleased
|
||||
|
||||
- Replace use of `anyhow::Error` with specific error types. [#296]
|
||||
- Minimum supported Rust version (MSRV) is now 1.60.
|
||||
## 0.6.0
|
||||
|
||||
[#296]: https://github.com/actix/actix-extras/pull/296
|
||||
- Add `error` module.
|
||||
- Replace use of `anyhow::Error` in return types with specific error types.
|
||||
- Update `actix-session` dependency to `0.8`.
|
||||
- Minimum supported Rust version (MSRV) is now 1.68.
|
||||
|
||||
## 0.5.2 - 2022-07-19
|
||||
## 0.5.2
|
||||
|
||||
- Fix visit deadline. [#263]
|
||||
|
||||
[#263]: https://github.com/actix/actix-extras/pull/263
|
||||
|
||||
## 0.5.1 - 2022-07-11
|
||||
## 0.5.1
|
||||
|
||||
- Remove unnecessary dependencies. [#259]
|
||||
|
||||
[#259]: https://github.com/actix/actix-extras/pull/259
|
||||
|
||||
## 0.5.0 - 2022-07-11
|
||||
## 0.5.0
|
||||
|
||||
`actix-identity` v0.5 is a complete rewrite. The goal is to streamline user experience and reduce maintenance overhead.
|
||||
|
||||
@ -55,56 +57,56 @@ Changes:
|
||||
|
||||
[#246]: https://github.com/actix/actix-extras/pull/246
|
||||
|
||||
## 0.4.0 - 2022-03-01
|
||||
## 0.4.0
|
||||
|
||||
- Update `actix-web` dependency to `4`.
|
||||
|
||||
## 0.4.0-beta.9 - 2022-02-07
|
||||
## 0.4.0-beta.9
|
||||
|
||||
- Relax body type bounds on middleware impl. [#223]
|
||||
- Update `actix-web` dependency to `4.0.0-rc.1`.
|
||||
|
||||
[#223]: https://github.com/actix/actix-extras/pull/223
|
||||
|
||||
## 0.4.0-beta.8 - 2022-01-21
|
||||
## 0.4.0-beta.8
|
||||
|
||||
- No significant changes since `0.4.0-beta.7`.
|
||||
|
||||
## 0.4.0-beta.7 - 2021-12-29
|
||||
## 0.4.0-beta.7
|
||||
|
||||
- Update `actix-web` dependency to `4.0.0.beta-18`. [#218]
|
||||
- Minimum supported Rust version (MSRV) is now 1.54.
|
||||
|
||||
[#218]: https://github.com/actix/actix-extras/pull/218
|
||||
|
||||
## 0.4.0-beta.6 - 2021-12-18
|
||||
## 0.4.0-beta.6
|
||||
|
||||
- Update `actix-web` dependency to `4.0.0.beta-15`. [#216]
|
||||
|
||||
[#216]: https://github.com/actix/actix-extras/pull/216
|
||||
|
||||
## 0.4.0-beta.5 - 2021-12-12
|
||||
## 0.4.0-beta.5
|
||||
|
||||
- Update `actix-web` dependency to `4.0.0.beta-14`. [#209]
|
||||
|
||||
[#209]: https://github.com/actix/actix-extras/pull/209
|
||||
|
||||
## 0.4.0-beta.4 - 2021-11-22
|
||||
## 0.4.0-beta.4
|
||||
|
||||
- No significant changes since `0.4.0-beta.3`.
|
||||
|
||||
## 0.4.0-beta.3 - 2021-10-21
|
||||
## 0.4.0-beta.3
|
||||
|
||||
- Update `actix-web` dependency to v4.0.0-beta.10. [#203]
|
||||
- Minimum supported Rust version (MSRV) is now 1.52.
|
||||
|
||||
[#203]: https://github.com/actix/actix-extras/pull/203
|
||||
|
||||
## 0.4.0-beta.2 - 2021-06-27
|
||||
## 0.4.0-beta.2
|
||||
|
||||
- No notable changes.
|
||||
|
||||
## 0.4.0-beta.1 - 2021-04-02
|
||||
## 0.4.0-beta.1
|
||||
|
||||
- Rename `CookieIdentityPolicy::{max_age => max_age_secs}`. [#168]
|
||||
- Rename `CookieIdentityPolicy::{max_age_time => max_age}`. [#168]
|
||||
@ -113,24 +115,24 @@ Changes:
|
||||
|
||||
[#168]: https://github.com/actix/actix-extras/pull/168
|
||||
|
||||
## 0.3.1 - 2020-09-20
|
||||
## 0.3.1
|
||||
|
||||
- Add method to set `HttpOnly` flag on cookie identity. [#102]
|
||||
|
||||
[#102]: https://github.com/actix/actix-extras/pull/102
|
||||
|
||||
## 0.3.0 - 2020-09-11
|
||||
## 0.3.0
|
||||
|
||||
- Update `actix-web` dependency to 3.0.0.
|
||||
- Minimum supported Rust version (MSRV) is now 1.42.0.
|
||||
|
||||
## 0.3.0-alpha.1 - 2020-03-14
|
||||
## 0.3.0-alpha.1
|
||||
|
||||
- Update the `time` dependency to 0.2.7
|
||||
- Update the `actix-web` dependency to 3.0.0-alpha.1
|
||||
- Minimize `futures` dependency
|
||||
|
||||
## 0.2.1 - 2020-01-10
|
||||
## 0.2.1
|
||||
|
||||
- Fix panic with already borrowed: BorrowMutError #1263
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "actix-identity"
|
||||
version = "0.5.2"
|
||||
version = "0.6.0"
|
||||
authors = [
|
||||
"Nikolay Kim <fafhrd91@gmail.com>",
|
||||
"Luca Palmieri <rust@lpalmieri.com>",
|
||||
@ -9,9 +9,9 @@ description = "Identity management for Actix Web"
|
||||
keywords = ["actix", "auth", "identity", "web", "security"]
|
||||
homepage = "https://actix.rs"
|
||||
repository = "https://github.com/actix/actix-extras.git"
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2018"
|
||||
rust-version = "1.60"
|
||||
license.workspace = true
|
||||
edition.workspace = true
|
||||
rust-version.workspace = true
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
rustdoc-args = ["--cfg", "docsrs"]
|
||||
@ -19,7 +19,7 @@ all-features = true
|
||||
|
||||
[dependencies]
|
||||
actix-service = "2"
|
||||
actix-session = "0.7"
|
||||
actix-session = "0.8"
|
||||
actix-utils = "3"
|
||||
actix-web = { version = "4", default-features = false, features = ["cookies", "secure-cookies"] }
|
||||
|
||||
@ -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.7", features = ["redis-rs-session", "cookie-session"] }
|
||||
actix-session = { version = "0.8", features = ["redis-rs-session", "cookie-session"] }
|
||||
|
||||
env_logger = "0.10"
|
||||
reqwest = { version = "0.11", default-features = false, features = ["cookies", "json"] }
|
||||
|
@ -3,9 +3,9 @@
|
||||
> Identity management for Actix Web.
|
||||
|
||||
[](https://crates.io/crates/actix-identity)
|
||||
[](https://docs.rs/actix-identity/0.5.2)
|
||||
[](https://docs.rs/actix-identity/0.6.0)
|
||||

|
||||
[](https://deps.rs/crate/actix-identity/0.5.2)
|
||||
[](https://deps.rs/crate/actix-identity/0.6.0)
|
||||
|
||||
## Documentation & community resources
|
||||
|
||||
|
@ -1,10 +1,19 @@
|
||||
# Changes
|
||||
|
||||
## Unreleased - 2022-xx-xx
|
||||
- Added optional scopes to the middleware enabling use of multiple Limiters by passing an `HashMap<Limiter>` to the Http server `app_data`
|
||||
- Update `redis` dependency to `0.22`.
|
||||
## Unreleased - 2023-xx-xx
|
||||
|
||||
## 0.4.0 - 2022-09-10
|
||||
- Added optional scopes to the middleware enabling use of multiple Limiters by passing an `HashMap<Limiter>` to the Http server `app_data`
|
||||
|
||||
## 0.5.1
|
||||
|
||||
- No significant changes since `0.5.0`.
|
||||
|
||||
## 0.5.0
|
||||
|
||||
- Update `redis` dependency to `0.23`.
|
||||
- Update `actix-session` dependency to `0.8`.
|
||||
|
||||
## 0.4.0
|
||||
|
||||
- Add `Builder::key_by` for setting a custom rate limit key function.
|
||||
- Implement `Default` for `RateLimiter`.
|
||||
@ -12,13 +21,13 @@
|
||||
- In the middleware errors from the count function are matched and respond with `INTERNAL_SERVER_ERROR` if it's an unexpected error, instead of the default `TOO_MANY_REQUESTS`.
|
||||
- Minimum supported Rust version (MSRV) is now 1.59 due to transitive `time` dependency.
|
||||
|
||||
## 0.3.0 - 2022-07-11
|
||||
## 0.3.0
|
||||
|
||||
- `Limiter::builder` now takes an `impl Into<String>`.
|
||||
- Removed lifetime from `Builder`.
|
||||
- Updated `actix-session` dependency to `0.7`.
|
||||
|
||||
## 0.2.0 - 2022-03-22
|
||||
## 0.2.0
|
||||
|
||||
- Update Actix Web dependency to v4 ecosystem.
|
||||
- Update Tokio dependencies to v1 ecosystem.
|
||||
@ -26,6 +35,6 @@
|
||||
- Rename `Builder::{finish => build}()`.
|
||||
- Exceeding the rate limit now returns a 429 Too Many Requests response.
|
||||
|
||||
## 0.1.4 - 2022-03-18
|
||||
## 0.1.4
|
||||
|
||||
- Adopted into @actix org from <https://github.com/0xmad/actix-limitation>.
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "actix-limitation"
|
||||
version = "0.4.0"
|
||||
version = "0.5.1"
|
||||
authors = [
|
||||
"0xmad <0xmad@users.noreply.github.com>",
|
||||
"Rob Ede <robjtede@icloud.com>",
|
||||
@ -9,9 +9,9 @@ description = "Rate limiter using a fixed window counter for arbitrary keys, bac
|
||||
keywords = ["actix-web", "rate-api", "rate-limit", "limitation"]
|
||||
categories = ["asynchronous", "web-programming"]
|
||||
repository = "https://github.com/actix/actix-extras.git"
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2018"
|
||||
rust-version = "1.60"
|
||||
license.workspace = true
|
||||
edition.workspace = true
|
||||
rust-version.workspace = true
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
rustdoc-args = ["--cfg", "docsrs"]
|
||||
@ -23,16 +23,16 @@ session = ["actix-session"]
|
||||
|
||||
[dependencies]
|
||||
actix-utils = "3"
|
||||
actix-web = { version = "4", features = ["cookies"] }
|
||||
actix-web = { version = "4", default-features = false, features = ["cookies"] }
|
||||
|
||||
chrono = "0.4"
|
||||
derive_more = "0.99.7"
|
||||
log = "0.4"
|
||||
redis = { version = "0.22", default-features = false, features = ["tokio-comp"] }
|
||||
redis = { version = "0.23", default-features = false, features = ["tokio-comp"] }
|
||||
time = "0.3"
|
||||
|
||||
# session
|
||||
actix-session = { version = "0.7", optional = true }
|
||||
actix-session = { version = "0.8", optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
actix-web = "4"
|
||||
|
@ -4,16 +4,16 @@
|
||||
> Originally based on <https://github.com/fnichol/limitation>.
|
||||
|
||||
[](https://crates.io/crates/actix-limitation)
|
||||
[](https://docs.rs/actix-limitation/0.4.0)
|
||||
[](https://docs.rs/actix-limitation/0.5.1)
|
||||

|
||||
[](https://deps.rs/crate/actix-limitation/0.4.0)
|
||||
[](https://deps.rs/crate/actix-limitation/0.5.1)
|
||||
|
||||
## Examples
|
||||
|
||||
```toml
|
||||
[dependencies]
|
||||
actix-web = "4"
|
||||
actix-limitation = "0.3"
|
||||
actix-limitation = "0.5"
|
||||
```
|
||||
|
||||
```rust
|
||||
|
@ -1,39 +1,42 @@
|
||||
# Changes
|
||||
|
||||
## Unreleased - 2022-xx-xx
|
||||
## Unreleased
|
||||
|
||||
- Minimum supported Rust version (MSRV) is now 1.60.
|
||||
## 0.10.0
|
||||
|
||||
## 0.9.0 - 2022-08-24
|
||||
- Updated `prost` dependency to `0.12`.
|
||||
- Minimum supported Rust version (MSRV) is now 1.68.
|
||||
|
||||
## 0.9.0
|
||||
|
||||
- Added `application/x-protobuf` as an acceptable header.
|
||||
- Updated `prost` dependency to `0.11`.
|
||||
|
||||
## 0.8.0 - 2022-06-25
|
||||
## 0.8.0
|
||||
|
||||
- Update `prost` dependency to `0.10`.
|
||||
- Minimum supported Rust version (MSRV) is now 1.57 due to transitive `time` dependency.
|
||||
|
||||
## 0.7.0 - 2022-03-01
|
||||
## 0.7.0
|
||||
|
||||
- Update `actix-web` dependency to `4`.
|
||||
|
||||
## 0.7.0-beta.5 - 2022-02-03
|
||||
## 0.7.0-beta.5
|
||||
|
||||
- Update `prost` dependency to `0.9`.
|
||||
- Update `actix-web` dependency to `4.0.0-rc.1`.
|
||||
|
||||
## 0.7.0-beta.4 - 2021-12-29
|
||||
## 0.7.0-beta.4
|
||||
|
||||
- Minimum supported Rust version (MSRV) is now 1.54.
|
||||
|
||||
## 0.7.0-beta.3 - 2021-12-12
|
||||
## 0.7.0-beta.3
|
||||
|
||||
- Update `actix-web` dependency to `4.0.0.beta-14`. [#209]
|
||||
|
||||
[#209]: https://github.com/actix/actix-extras/pull/209
|
||||
|
||||
## 0.7.0-beta.2 - 2021-10-21
|
||||
## 0.7.0-beta.2
|
||||
|
||||
- Bump `prost` version to 0.8. [#197]
|
||||
- Update `actix-web` dependency to v4.0.0-beta.10. [#203]
|
||||
@ -42,7 +45,7 @@
|
||||
[#197]: https://github.com/actix/actix-extras/pull/197
|
||||
[#203]: https://github.com/actix/actix-extras/pull/203
|
||||
|
||||
## 0.7.0-beta.1 - 2021-06-27
|
||||
## 0.7.0-beta.1
|
||||
|
||||
- Bump `prost` version to 0.7. [#144]
|
||||
- Update `actix-web` dependency to 4.0.0 beta.
|
||||
@ -50,12 +53,12 @@
|
||||
|
||||
[#144]: https://github.com/actix/actix-extras/pull/144
|
||||
|
||||
## 0.6.0 - 2020-09-11
|
||||
## 0.6.0
|
||||
|
||||
- Update `actix-web` dependency to 3.0.0.
|
||||
- Minimum supported Rust version (MSRV) is now 1.42.0 to use `matches!` macro.
|
||||
|
||||
## 0.6.0-alpha.1 - 2020-07-06
|
||||
## 0.6.0-alpha.1
|
||||
|
||||
- Update `actix-web` to 3.0.0-alpha.3
|
||||
- Minimum supported Rust version(MSRV) is now 1.40.0.
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "actix-protobuf"
|
||||
version = "0.9.0"
|
||||
version = "0.10.0"
|
||||
authors = [
|
||||
"kingxsp <jin.hb.zh@outlook.com>",
|
||||
"Yuki Okushi <huyuumi.dev@gmail.com>",
|
||||
@ -9,9 +9,9 @@ description = "Protobuf payload extractor for Actix Web"
|
||||
keywords = ["actix", "web", "protobuf", "protocol", "rpc"]
|
||||
homepage = "https://actix.rs"
|
||||
repository = "https://github.com/actix/actix-extras.git"
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2018"
|
||||
rust-version = "1.60"
|
||||
license.workspace = true
|
||||
edition.workspace = true
|
||||
rust-version.workspace = true
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
rustdoc-args = ["--cfg", "docsrs"]
|
||||
@ -20,9 +20,9 @@ all-features = true
|
||||
[dependencies]
|
||||
actix-web = { version = "4", default-features = false }
|
||||
derive_more = "0.99.7"
|
||||
futures-util = { version = "0.3.7", default-features = false }
|
||||
prost = { version = "0.11", default-features = false }
|
||||
futures-util = { version = "0.3.17", default-features = false, features = ["std"] }
|
||||
prost = { version = "0.12", default-features = false }
|
||||
|
||||
[dev-dependencies]
|
||||
actix-web = { version = "4", default-features = false, features = ["macros"] }
|
||||
prost = { version = "0.11", default-features = false, features = ["prost-derive"] }
|
||||
prost = { version = "0.12", default-features = false, features = ["prost-derive"] }
|
||||
|
@ -3,9 +3,9 @@
|
||||
> Protobuf payload extractor for Actix Web.
|
||||
|
||||
[](https://crates.io/crates/actix-protobuf)
|
||||
[](https://docs.rs/actix-protobuf/0.9.0)
|
||||
[](https://docs.rs/actix-protobuf/0.10.0)
|
||||

|
||||
[](https://deps.rs/crate/actix-protobuf/0.9.0)
|
||||
[](https://deps.rs/crate/actix-protobuf/0.10.0)
|
||||
|
||||
## Documentation & Resources
|
||||
|
||||
|
@ -1,18 +1,20 @@
|
||||
# Changes
|
||||
|
||||
## Unreleased - 2022-xx-xx
|
||||
## Unreleased
|
||||
|
||||
- Update `redis-async` dependency to `0.14`.
|
||||
- Minimum supported Rust version (MSRV) is now 1.60.
|
||||
## 0.13.0
|
||||
|
||||
## 0.12.0 - 2022-07-09
|
||||
- Update `redis-async` dependency to `0.16`.
|
||||
- Minimum supported Rust version (MSRV) is now 1.68.
|
||||
|
||||
## 0.12.0
|
||||
|
||||
- Update `actix` dependency to `0.13`.
|
||||
- Update `redis-async` dependency to `0.13`.
|
||||
- Update `tokio-util` dependency to `0.7`.
|
||||
- Minimum supported Rust version (MSRV) is now 1.57 due to transitive `time` dependency.
|
||||
|
||||
## 0.11.0 - 2022-03-15
|
||||
## 0.11.0
|
||||
|
||||
### Removed
|
||||
|
||||
@ -24,22 +26,22 @@
|
||||
|
||||
[#212]: https://github.com/actix/actix-extras/pull/212
|
||||
|
||||
## 0.10.0 - 2022-03-01
|
||||
## 0.10.0
|
||||
|
||||
- Update `actix-web` dependency to `4`.
|
||||
|
||||
## 0.10.0-beta.6 - 2022-02-07
|
||||
## 0.10.0-beta.6
|
||||
|
||||
- Update `actix-web` dependency to `4.0.0-rc.1`.
|
||||
|
||||
## 0.10.0-beta.5 - 2021-12-29
|
||||
## 0.10.0-beta.5
|
||||
|
||||
- Update `actix-web` dependency to `4.0.0.beta-18`. [#218]
|
||||
- Minimum supported Rust version (MSRV) is now 1.54.
|
||||
|
||||
[#218]: https://github.com/actix/actix-extras/pull/218
|
||||
|
||||
## 0.10.0-beta.4 - 2021-12-12
|
||||
## 0.10.0-beta.4
|
||||
|
||||
- A session will be created in Redis if and only if there is some data inside the session state. This reduces the performance impact of `RedisSession` on routes that do not leverage sessions. [#207]
|
||||
- Update `actix-web` dependency to `4.0.0.beta-14`. [#209]
|
||||
@ -47,23 +49,23 @@
|
||||
[#207]: https://github.com/actix/actix-extras/pull/207
|
||||
[#209]: https://github.com/actix/actix-extras/pull/209
|
||||
|
||||
## 0.10.0-beta.3 - 2021-10-21
|
||||
## 0.10.0-beta.3
|
||||
|
||||
- Update `actix-web` dependency to v4.0.0-beta.10. [#203]
|
||||
- Minimum supported Rust version (MSRV) is now 1.52.
|
||||
|
||||
[#203]: https://github.com/actix/actix-extras/pull/203
|
||||
|
||||
## 0.10.0-beta.2 - 2021-06-27
|
||||
## 0.10.0-beta.2
|
||||
|
||||
- No notable changes.
|
||||
|
||||
## 0.10.0-beta.1 - 2021-04-02
|
||||
## 0.10.0-beta.1
|
||||
|
||||
- Update `actix-web` dependency to 4.0.0 beta.
|
||||
- Minimum supported Rust version (MSRV) is now 1.46.0.
|
||||
|
||||
## 0.9.2 - 2021-03-21
|
||||
## 0.9.2
|
||||
|
||||
- Implement `std::error::Error` for `Error` [#135]
|
||||
- Allow the removal of `Max-Age` for session-only cookies. [#161]
|
||||
@ -71,16 +73,16 @@
|
||||
[#135]: https://github.com/actix/actix-extras/pull/135
|
||||
[#161]: https://github.com/actix/actix-extras/pull/161
|
||||
|
||||
## 0.9.1 - 2020-09-12
|
||||
## 0.9.1
|
||||
|
||||
- Enforce minimum redis-async version of 0.6.3 to workaround breaking patch change.
|
||||
|
||||
## 0.9.0 - 2020-09-11
|
||||
## 0.9.0
|
||||
|
||||
- Update `actix-web` dependency to 3.0.0.
|
||||
- Minimize `futures` dependency.
|
||||
|
||||
## 0.9.0-alpha.2 - 2020-05-17
|
||||
## 0.9.0-alpha.2
|
||||
|
||||
- Add `cookie_http_only` functionality to RedisSession builder, setting this
|
||||
to false allows JavaScript to access cookies. Defaults to true.
|
||||
@ -89,14 +91,14 @@
|
||||
- Update `tokio-util` to 0.3
|
||||
- Minimum supported Rust version(MSRV) is now 1.40.0.
|
||||
|
||||
## 0.9.0-alpha.1 - 2020-03-28
|
||||
## 0.9.0-alpha.1
|
||||
|
||||
- Update `actix` to 0.10.0-alpha.2
|
||||
- Update `actix-session` to 0.4.0-alpha.1
|
||||
- Update `actix-web` to 3.0.0-alpha.1
|
||||
- Update `time` to 0.2.9
|
||||
|
||||
## 0.8.1 - 2020-02-18
|
||||
## 0.8.1
|
||||
|
||||
- Move `env_logger` dependency to dev-dependencies and update to 0.7
|
||||
- Update `actix_web` to 2.0.0 from 2.0.0-rc
|
||||
|
@ -1,15 +1,15 @@
|
||||
[package]
|
||||
name = "actix-redis"
|
||||
version = "0.12.0"
|
||||
version = "0.13.0"
|
||||
authors = ["Nikolay Kim <fafhrd91@gmail.com>"]
|
||||
description = "Actor-based Redis client"
|
||||
license = "MIT OR Apache-2.0"
|
||||
keywords = ["actix", "redis", "async"]
|
||||
homepage = "https://actix.rs"
|
||||
repository = "https://github.com/actix/actix-extras.git"
|
||||
categories = ["network-programming", "asynchronous"]
|
||||
edition = "2018"
|
||||
rust-version = "1.60"
|
||||
license.workspace = true
|
||||
edition.workspace = true
|
||||
rust-version.workspace = true
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
rustdoc-args = ["--cfg", "docsrs"]
|
||||
@ -35,7 +35,7 @@ log = "0.4.6"
|
||||
backoff = "0.4.0"
|
||||
derive_more = "0.99.7"
|
||||
futures-core = { version = "0.3.7", default-features = false }
|
||||
redis-async = "0.14"
|
||||
redis-async = "0.16"
|
||||
time = "0.3"
|
||||
tokio = { version = "1.18.4", features = ["sync"] }
|
||||
tokio-util = "0.7"
|
||||
|
@ -3,9 +3,9 @@
|
||||
> Actor-based Redis client.
|
||||
|
||||
[](https://crates.io/crates/actix-redis)
|
||||
[](https://docs.rs/actix-redis/0.12.0)
|
||||
[](https://docs.rs/actix-redis/0.13.0)
|
||||

|
||||
[](https://deps.rs/crate/actix-redis/0.12.0)
|
||||
[](https://deps.rs/crate/actix-redis/0.13.0)
|
||||
|
||||
## Documentation & Resources
|
||||
|
||||
|
@ -1,25 +1,27 @@
|
||||
# Changes
|
||||
|
||||
## Unreleased - 2021-xx-xx
|
||||
## Unreleased
|
||||
|
||||
## 0.8.0
|
||||
|
||||
- Set secure attribute when adding a session removal cookie.
|
||||
- Update `redis` dependency to `0.22`.
|
||||
- Minimum supported Rust version (MSRV) is now 1.60.
|
||||
- Update `redis` dependency to `0.23`.
|
||||
- Minimum supported Rust version (MSRV) is now 1.68.
|
||||
|
||||
## 0.7.2 - 2022-09-11
|
||||
## 0.7.2
|
||||
|
||||
- Set SameSite attribute when adding a session removal cookie. [#284]
|
||||
- Minimum supported Rust version (MSRV) is now 1.59 due to transitive `time` dependency.
|
||||
|
||||
[#284]: https://github.com/actix/actix-extras/pull/284
|
||||
|
||||
## 0.7.1 - 2022-07-24
|
||||
## 0.7.1
|
||||
|
||||
- Fix interaction between session state changes and renewal. [#265]
|
||||
|
||||
[#265]: https://github.com/actix/actix-extras/pull/265
|
||||
|
||||
## 0.7.0 - 2022-07-09
|
||||
## 0.7.0
|
||||
|
||||
- Added `TtlExtensionPolicy` enum to support different strategies for extending the TTL attached to the session state. `TtlExtensionPolicy::OnEveryRequest` now allows for long-lived sessions that do not expire if the user remains active. [#233]
|
||||
- `SessionLength` is now called `SessionLifecycle`. [#233]
|
||||
@ -36,7 +38,7 @@
|
||||
|
||||
[#233]: https://github.com/actix/actix-extras/pull/233
|
||||
|
||||
## 0.6.2 - 2022-03-25
|
||||
## 0.6.2
|
||||
|
||||
- Implement `SessionExt` for `GuardContext`. [#234]
|
||||
- `RedisSessionStore` will prevent connection timeouts from causing user-visible errors. [#235]
|
||||
@ -46,11 +48,11 @@
|
||||
[#236]: https://github.com/actix/actix-extras/pull/236
|
||||
[#235]: https://github.com/actix/actix-extras/pull/235
|
||||
|
||||
## 0.6.1 - 2022-03-21
|
||||
## 0.6.1
|
||||
|
||||
- No significant changes since `0.6.0`.
|
||||
|
||||
## 0.6.0 - 2022-03-15
|
||||
## 0.6.0
|
||||
|
||||
### Added
|
||||
|
||||
@ -72,28 +74,28 @@
|
||||
|
||||
[#212]: https://github.com/actix/actix-extras/pull/212
|
||||
|
||||
## 0.5.0 - 2022-03-01
|
||||
## 0.5.0
|
||||
|
||||
- Update `actix-web` dependency to `4`.
|
||||
|
||||
## 0.5.0-beta.8 - 2022-02-07
|
||||
## 0.5.0-beta.8
|
||||
|
||||
- Update `actix-web` dependency to `4.0.0-rc.1`.
|
||||
|
||||
## 0.5.0-beta.7 - 2021-12-29
|
||||
## 0.5.0-beta.7
|
||||
|
||||
- Update `actix-web` dependency to `4.0.0.beta-18`. [#218]
|
||||
- Minimum supported Rust version (MSRV) is now 1.54.
|
||||
|
||||
[#218]: https://github.com/actix/actix-extras/pull/218
|
||||
|
||||
## 0.5.0-beta.6 - 2021-12-18
|
||||
## 0.5.0-beta.6
|
||||
|
||||
- Update `actix-web` dependency to `4.0.0.beta-15`. [#216]
|
||||
|
||||
[#216]: https://github.com/actix/actix-extras/pull/216
|
||||
|
||||
## 0.5.0-beta.5 - 2021-12-12
|
||||
## 0.5.0-beta.5
|
||||
|
||||
- Update `actix-web` dependency to `4.0.0.beta-14`. [#209]
|
||||
- Remove `UserSession` implementation for `RequestHead`. [#209]
|
||||
@ -102,11 +104,11 @@
|
||||
[#207]: https://github.com/actix/actix-extras/pull/207
|
||||
[#209]: https://github.com/actix/actix-extras/pull/209
|
||||
|
||||
## 0.5.0-beta.4 - 2021-11-22
|
||||
## 0.5.0-beta.4
|
||||
|
||||
- No significant changes since `0.5.0-beta.3`.
|
||||
|
||||
## 0.5.0-beta.3 - 2021-10-21
|
||||
## 0.5.0-beta.3
|
||||
|
||||
- Impl `Clone` for `CookieSession`. [#201]
|
||||
- Update `actix-web` dependency to v4.0.0-beta.10. [#203]
|
||||
@ -115,11 +117,11 @@
|
||||
[#201]: https://github.com/actix/actix-extras/pull/201
|
||||
[#203]: https://github.com/actix/actix-extras/pull/203
|
||||
|
||||
## 0.5.0-beta.2 - 2021-06-27
|
||||
## 0.5.0-beta.2
|
||||
|
||||
- No notable changes.
|
||||
|
||||
## 0.5.0-beta.1 - 2021-04-02
|
||||
## 0.5.0-beta.1
|
||||
|
||||
- Add `Session::entries`. [#170]
|
||||
- Rename `Session::{set => insert}` to match standard hash map naming. [#170]
|
||||
@ -132,7 +134,7 @@
|
||||
|
||||
[#170]: https://github.com/actix/actix-extras/pull/170
|
||||
|
||||
## 0.4.1 - 2021-03-21
|
||||
## 0.4.1
|
||||
|
||||
- `Session::set_session` takes a `IntoIterator` instead of `Iterator`. [#105]
|
||||
- Fix calls to `session.purge()` from paths other than the one specified in the cookie. [#129]
|
||||
@ -140,12 +142,12 @@
|
||||
[#105]: https://github.com/actix/actix-extras/pull/105
|
||||
[#129]: https://github.com/actix/actix-extras/pull/129
|
||||
|
||||
## 0.4.0 - 2020-09-11
|
||||
## 0.4.0
|
||||
|
||||
- Update `actix-web` dependency to 3.0.0.
|
||||
- Minimum supported Rust version (MSRV) is now 1.42.0.
|
||||
|
||||
## 0.4.0-alpha.1 - 2020-03-14
|
||||
## 0.4.0-alpha.1
|
||||
|
||||
- Update the `time` dependency to 0.2.7
|
||||
- Update the `actix-web` dependency to 3.0.0-alpha.1
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "actix-session"
|
||||
version = "0.7.2"
|
||||
version = "0.8.0"
|
||||
authors = [
|
||||
"Nikolay Kim <fafhrd91@gmail.com>",
|
||||
"Luca Palmieri <rust@lpalmieri.com>",
|
||||
@ -9,9 +9,9 @@ description = "Session management for Actix We"
|
||||
keywords = ["http", "web", "framework", "async", "session"]
|
||||
homepage = "https://actix.rs"
|
||||
repository = "https://github.com/actix/actix-extras.git"
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2018"
|
||||
rust-version = "1.60"
|
||||
license.workspace = true
|
||||
edition.workspace = true
|
||||
rust-version.workspace = true
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
rustdoc-args = ["--cfg", "docsrs"]
|
||||
@ -43,7 +43,7 @@ actix-redis = { version = "0.12", optional = true }
|
||||
futures-core = { version = "0.3.7", default-features = false, optional = true }
|
||||
|
||||
# redis-rs-session
|
||||
redis = { version = "0.22", default-features = false, features = ["tokio-comp", "connection-manager"], optional = true }
|
||||
redis = { version = "0.23", default-features = false, features = ["tokio-comp", "connection-manager"], optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
actix-session = { path = ".", features = ["cookie-session", "redis-actor-session", "redis-rs-session"] }
|
||||
|
@ -3,9 +3,9 @@
|
||||
> Session management for Actix Web.
|
||||
|
||||
[](https://crates.io/crates/actix-session)
|
||||
[](https://docs.rs/actix-session/0.7.2)
|
||||
[](https://docs.rs/actix-session/0.8.0)
|
||||

|
||||
[](https://deps.rs/crate/actix-session/0.7.2)
|
||||
[](https://deps.rs/crate/actix-session/0.8.0)
|
||||
|
||||
## Documentation & Resources
|
||||
|
||||
|
@ -46,7 +46,7 @@ use serde::{de::DeserializeOwned, Serialize};
|
||||
pub struct Session(Rc<RefCell<SessionInner>>);
|
||||
|
||||
/// Status of a [`Session`].
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
#[derive(Debug, Clone, Default, PartialEq, Eq)]
|
||||
pub enum SessionStatus {
|
||||
/// Session state has been updated - the changes will have to be persisted to the backend.
|
||||
Changed,
|
||||
@ -64,15 +64,10 @@ pub enum SessionStatus {
|
||||
Renewed,
|
||||
|
||||
/// The session state has not been modified since its creation/retrieval.
|
||||
#[default]
|
||||
Unchanged,
|
||||
}
|
||||
|
||||
impl Default for SessionStatus {
|
||||
fn default() -> SessionStatus {
|
||||
SessionStatus::Unchanged
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
struct SessionInner {
|
||||
state: HashMap<String, String>,
|
||||
@ -218,6 +213,7 @@ impl Session {
|
||||
///
|
||||
/// Values that match keys already existing on the session will be overwritten. Values should
|
||||
/// already be JSON serialized.
|
||||
#[allow(clippy::needless_pass_by_ref_mut)]
|
||||
pub(crate) fn set_session(
|
||||
req: &mut ServiceRequest,
|
||||
data: impl IntoIterator<Item = (String, String)>,
|
||||
@ -232,6 +228,7 @@ impl Session {
|
||||
/// This is a destructive operation - the session state is removed from the request extensions
|
||||
/// typemap, leaving behind a new empty map. It should only be used when the session is being
|
||||
/// finalised (i.e. in `SessionMiddleware`).
|
||||
#[allow(clippy::needless_pass_by_ref_mut)]
|
||||
pub(crate) fn get_changes<B>(
|
||||
res: &mut ServiceResponse<B>,
|
||||
) -> (SessionStatus, HashMap<String, String>) {
|
||||
|
@ -261,6 +261,7 @@ impl RedisSessionStore {
|
||||
/// This helper method catches this case (`.is_connection_dropped`) to execute a retry. The
|
||||
/// retry will be executed on a fresh connection, therefore it is likely to succeed (or fail for
|
||||
/// a different more meaningful reason).
|
||||
#[allow(clippy::needless_pass_by_ref_mut)]
|
||||
async fn execute_command<T: FromRedisValue>(&self, cmd: &mut Cmd) -> RedisResult<T> {
|
||||
let mut can_retry = true;
|
||||
|
||||
|
@ -69,15 +69,18 @@ impl SessionStore for MockStore {
|
||||
_session_state: HashMap<String, String>,
|
||||
_ttl: &Duration,
|
||||
) -> Result<SessionKey, UpdateError> {
|
||||
todo!()
|
||||
#![allow(clippy::diverging_sub_expression)]
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
async fn update_ttl(&self, _session_key: &SessionKey, _ttl: &Duration) -> Result<(), Error> {
|
||||
todo!()
|
||||
#![allow(clippy::diverging_sub_expression)]
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
async fn delete(&self, _session_key: &SessionKey) -> Result<(), Error> {
|
||||
todo!()
|
||||
#![allow(clippy::diverging_sub_expression)]
|
||||
unimplemented!()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,17 +1,22 @@
|
||||
# Changes
|
||||
|
||||
## Unreleased - 2022-xx-xx
|
||||
## Unreleased
|
||||
|
||||
- Rename `AtError => Error`.
|
||||
- Remove `AtResult` type alias.
|
||||
- Minimum supported Rust version (MSRV) is now 1.60.
|
||||
- Update `toml` dependency to `0.8`.
|
||||
- Remove `ioe` dependency; `std::io::Error` is now used directly.
|
||||
- Remove `Clone` implementation for `Error`.
|
||||
- Implement `Display` for `Error`.
|
||||
- Implement std's `Error` for `Error`.
|
||||
- Minimum supported Rust version (MSRV) is now 1.68.
|
||||
|
||||
## 0.6.0 - 2022-07-31
|
||||
## 0.6.0
|
||||
|
||||
- Update Actix Web dependencies to v4 ecosystem.
|
||||
- Rename `actix.ssl` settings object to `actix.tls`.
|
||||
- `NoSettings` is now marked `#[non_exhaustive]`.
|
||||
|
||||
## 0.5.2 - 2022-07-31
|
||||
## 0.5.2
|
||||
|
||||
- Adopted into @actix org from <https://github.com/jjpe/actix-settings>.
|
||||
|
@ -6,9 +6,9 @@ authors = [
|
||||
"Rob Ede <robjtede@icloud.com>",
|
||||
]
|
||||
description = "Easily manage Actix Web's settings from a TOML file and environment variables"
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2018"
|
||||
rust-version = "1.60"
|
||||
license.workspace = true
|
||||
edition.workspace = true
|
||||
rust-version.workspace = true
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
rustdoc-args = ["--cfg", "docsrs"]
|
||||
@ -17,13 +17,13 @@ all-features = true
|
||||
[dependencies]
|
||||
actix-http = "3"
|
||||
actix-service = "2"
|
||||
actix-web = "4"
|
||||
|
||||
ioe = "0.5"
|
||||
actix-web = { version = "4", default-features = false }
|
||||
derive_more = "0.99.7"
|
||||
once_cell = "1.13"
|
||||
regex = "1.5.5"
|
||||
regex = "1.5"
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
toml = "0.5"
|
||||
toml = "0.8"
|
||||
|
||||
[dev-dependencies]
|
||||
actix-web = "4"
|
||||
env_logger = "0.10"
|
||||
|
@ -1,18 +1,22 @@
|
||||
use std::{env::VarError, io, num::ParseIntError, path::PathBuf, str::ParseBoolError};
|
||||
|
||||
use derive_more::{Display, Error};
|
||||
use toml::de::Error as TomlError;
|
||||
|
||||
/// Errors that can be returned from methods in this crate.
|
||||
#[derive(Debug, Clone)]
|
||||
#[derive(Debug, Display, Error)]
|
||||
pub enum Error {
|
||||
/// Environment variable does not exists or is invalid.
|
||||
#[display(fmt = "Env var error: {_0}")]
|
||||
EnvVarError(VarError),
|
||||
|
||||
/// File already exists on disk.
|
||||
FileExists(PathBuf),
|
||||
#[display(fmt = "File exists: {}", "_0.display()")]
|
||||
FileExists(#[error(not(source))] PathBuf),
|
||||
|
||||
/// Invalid value.
|
||||
#[allow(missing_docs)]
|
||||
#[display(fmt = "Expected {expected}, got {got} (@ {file}:{line}:{column})")]
|
||||
InvalidValue {
|
||||
expected: &'static str,
|
||||
got: String,
|
||||
@ -22,18 +26,23 @@ pub enum Error {
|
||||
},
|
||||
|
||||
/// I/O error.
|
||||
IoError(ioe::IoError),
|
||||
#[display(fmt = "")]
|
||||
IoError(io::Error),
|
||||
|
||||
/// Value is not a boolean.
|
||||
#[display(fmt = "Failed to parse boolean: {_0}")]
|
||||
ParseBoolError(ParseBoolError),
|
||||
|
||||
/// Value is not an integer.
|
||||
#[display(fmt = "Failed to parse integer: {_0}")]
|
||||
ParseIntError(ParseIntError),
|
||||
|
||||
/// Value is not an address.
|
||||
ParseAddressError(String),
|
||||
#[display(fmt = "Failed to parse address: {_0}")]
|
||||
ParseAddressError(#[error(not(source))] String),
|
||||
|
||||
/// Error deserializing as TOML.
|
||||
#[display(fmt = "TOML error: {_0}")]
|
||||
TomlError(TomlError),
|
||||
}
|
||||
|
||||
@ -51,12 +60,6 @@ macro_rules! InvalidValue {
|
||||
|
||||
impl From<io::Error> for Error {
|
||||
fn from(err: io::Error) -> Self {
|
||||
Self::IoError(ioe::IoError::from(err))
|
||||
}
|
||||
}
|
||||
|
||||
impl From<ioe::IoError> for Error {
|
||||
fn from(err: ioe::IoError) -> Self {
|
||||
Self::IoError(err)
|
||||
}
|
||||
}
|
||||
@ -88,48 +91,27 @@ impl From<VarError> for Error {
|
||||
impl From<Error> for io::Error {
|
||||
fn from(err: Error) -> Self {
|
||||
match err {
|
||||
Error::EnvVarError(var_error) => {
|
||||
let msg = format!("Env var error: {var_error}");
|
||||
io::Error::new(io::ErrorKind::InvalidInput, msg)
|
||||
Error::EnvVarError(_) => io::Error::new(io::ErrorKind::InvalidInput, err.to_string()),
|
||||
|
||||
Error::FileExists(_) => io::Error::new(io::ErrorKind::AlreadyExists, err.to_string()),
|
||||
|
||||
Error::InvalidValue { .. } => {
|
||||
io::Error::new(io::ErrorKind::InvalidInput, err.to_string())
|
||||
}
|
||||
|
||||
Error::FileExists(path_buf) => {
|
||||
let msg = format!("File exists: {}", path_buf.display());
|
||||
io::Error::new(io::ErrorKind::AlreadyExists, msg)
|
||||
Error::IoError(io_error) => io_error,
|
||||
|
||||
Error::ParseBoolError(_) => {
|
||||
io::Error::new(io::ErrorKind::InvalidInput, err.to_string())
|
||||
}
|
||||
|
||||
Error::InvalidValue {
|
||||
expected,
|
||||
ref got,
|
||||
file,
|
||||
line,
|
||||
column,
|
||||
} => {
|
||||
let msg = format!("Expected {expected}, got {got} (@ {file}:{line}:{column})");
|
||||
io::Error::new(io::ErrorKind::InvalidInput, msg)
|
||||
Error::ParseIntError(_) => io::Error::new(io::ErrorKind::InvalidInput, err.to_string()),
|
||||
|
||||
Error::ParseAddressError(_) => {
|
||||
io::Error::new(io::ErrorKind::InvalidInput, err.to_string())
|
||||
}
|
||||
|
||||
Error::IoError(io_error) => io_error.into(),
|
||||
|
||||
Error::ParseBoolError(parse_bool_error) => {
|
||||
let msg = format!("Failed to parse boolean: {parse_bool_error}");
|
||||
io::Error::new(io::ErrorKind::InvalidInput, msg)
|
||||
}
|
||||
|
||||
Error::ParseIntError(parse_int_error) => {
|
||||
let msg = format!("Failed to parse integer: {parse_int_error}");
|
||||
io::Error::new(io::ErrorKind::InvalidInput, msg)
|
||||
}
|
||||
|
||||
Error::ParseAddressError(string) => {
|
||||
let msg = format!("Failed to parse address: {string}");
|
||||
io::Error::new(io::ErrorKind::InvalidInput, msg)
|
||||
}
|
||||
|
||||
Error::TomlError(toml_error) => {
|
||||
let msg = format!("TOML error: {toml_error}");
|
||||
io::Error::new(io::ErrorKind::InvalidInput, msg)
|
||||
}
|
||||
Error::TomlError(_) => io::Error::new(io::ErrorKind::InvalidInput, err.to_string()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -169,7 +169,8 @@ where
|
||||
/// Writes the default TOML template to a new file, located at `filepath`.
|
||||
///
|
||||
/// # Errors
|
||||
/// Returns a [`FileExists`](crate::AtError::FileExists) error if a file already exists at that
|
||||
///
|
||||
/// Returns a [`FileExists`](crate::Error::FileExists) error if a file already exists at that
|
||||
/// location.
|
||||
pub fn write_toml_file<P>(filepath: P) -> AsResult<()>
|
||||
where
|
||||
|
@ -2,7 +2,7 @@ use std::{path::PathBuf, str::FromStr};
|
||||
|
||||
use crate::Error;
|
||||
|
||||
/// A specialized `FromStr` trait that returns [`AtError`] errors
|
||||
/// A specialized `FromStr` trait that returns [`Error`] errors
|
||||
pub trait Parse: Sized {
|
||||
/// Parse `Self` from `string`.
|
||||
fn parse(string: &str) -> Result<Self, Error>;
|
||||
|
@ -1,10 +1,13 @@
|
||||
# Changes
|
||||
|
||||
## Unreleased - 2022-xx-xx
|
||||
## Unreleased
|
||||
|
||||
- Minimum supported Rust version (MSRV) is now 1.60.
|
||||
## 0.8.1
|
||||
|
||||
## 0.8.0 - 2022-07-21
|
||||
- Implement `From<Basic>` for `BasicAuth`.
|
||||
- Minimum supported Rust version (MSRV) is now 1.68.
|
||||
|
||||
## 0.8.0
|
||||
|
||||
- Removed `AuthExtractor` trait; implement `FromRequest` for your custom auth types. [#264]
|
||||
- `BasicAuth::user_id()` now returns `&str`. [#249]
|
||||
@ -16,74 +19,74 @@
|
||||
[#249]: https://github.com/actix/actix-extras/pull/249
|
||||
[#264]: https://github.com/actix/actix-extras/pull/264
|
||||
|
||||
## 0.7.0 - 2022-07-19
|
||||
## 0.7.0
|
||||
|
||||
- Auth validator functions now need to return `(Error, ServiceRequest)` in error cases. [#260]
|
||||
- Minimum supported Rust version (MSRV) is now 1.57 due to transitive `time` dependency.
|
||||
|
||||
[#260]: https://github.com/actix/actix-extras/pull/260
|
||||
|
||||
## 0.6.0 - 2022-03-01
|
||||
## 0.6.0
|
||||
|
||||
- Update `actix-web` dependency to `4`.
|
||||
|
||||
## 0.6.0-beta.8 - 2022-02-07
|
||||
## 0.6.0-beta.8
|
||||
|
||||
- Relax body type bounds on middleware impl. [#223]
|
||||
- Update `actix-web` dependency to `4.0.0-rc.1`.
|
||||
|
||||
[#223]: https://github.com/actix/actix-extras/pull/223
|
||||
|
||||
## 0.6.0-beta.7 - 2021-12-29
|
||||
## 0.6.0-beta.7
|
||||
|
||||
- Minimum supported Rust version (MSRV) is now 1.54.
|
||||
|
||||
## 0.6.0-beta.6 - 2021-12-18
|
||||
## 0.6.0-beta.6
|
||||
|
||||
- Update `actix-web` dependency to `4.0.0.beta-15`. [#216]
|
||||
|
||||
[#216]: https://github.com/actix/actix-extras/pull/216
|
||||
|
||||
## 0.6.0-beta.5 - 2021-12-12
|
||||
## 0.6.0-beta.5
|
||||
|
||||
- Update `actix-web` dependency to `4.0.0.beta-14`. [#209]
|
||||
|
||||
[#209]: https://github.com/actix/actix-extras/pull/209
|
||||
|
||||
## 0.6.0-beta.4 - 2021-11-22
|
||||
## 0.6.0-beta.4
|
||||
|
||||
- impl `AuthExtractor` trait for `Option<T: AuthExtractor>` and `Result<T: AuthExtractor, T::Error>`. [#205]
|
||||
|
||||
[#205]: https://github.com/actix/actix-extras/pull/205
|
||||
|
||||
## 0.6.0-beta.3 - 2021-10-21
|
||||
## 0.6.0-beta.3
|
||||
|
||||
- Update `actix-web` dependency to v4.0.0-beta.10. [#203]
|
||||
- Minimum supported Rust version (MSRV) is now 1.52.
|
||||
|
||||
[#203]: https://github.com/actix/actix-extras/pull/203
|
||||
|
||||
## 0.6.0-beta.2 - 2021-06-27
|
||||
## 0.6.0-beta.2
|
||||
|
||||
- No notable changes.
|
||||
|
||||
## 0.6.0-beta.1 - 2021-04-02
|
||||
## 0.6.0-beta.1
|
||||
|
||||
- Update `actix-web` dependency to 4.0.0 beta.
|
||||
- Minimum supported Rust version (MSRV) is now 1.46.0.
|
||||
|
||||
## 0.5.1 - 2021-03-21
|
||||
## 0.5.1
|
||||
|
||||
- Correct error handling when extracting auth details from request. [#128]
|
||||
|
||||
[#128]: https://github.com/actix/actix-extras/pull/128
|
||||
|
||||
## 0.5.0 - 2020-09-11
|
||||
## 0.5.0
|
||||
|
||||
- Update `actix-web` dependency to 3.0.0.
|
||||
- Minimum supported Rust version (MSRV) is now 1.42.0.
|
||||
|
||||
## 0.4.2 - 2020-07-08
|
||||
## 0.4.2
|
||||
|
||||
- Update the `base64` dependency to 0.12
|
||||
- AuthenticationError's status code is preserved when converting to a ResponseError
|
||||
@ -92,11 +95,11 @@
|
||||
|
||||
[#69]: https://github.com/actix/actix-web-httpauth/pull/69
|
||||
|
||||
## 0.4.1 - 2020-02-19
|
||||
## 0.4.1
|
||||
|
||||
- Move repository to actix-extras
|
||||
|
||||
## 0.4.0 - 2020-01-14
|
||||
## 0.4.0
|
||||
|
||||
- Depends on `actix-web = "^2.0"`, `actix-service = "^1.0"`, and `futures = "^0.3"` version now ([#14])
|
||||
- Depends on `bytes = "^0.5"` and `base64 = "^0.11"` now
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "actix-web-httpauth"
|
||||
version = "0.8.0"
|
||||
version = "0.8.1"
|
||||
authors = [
|
||||
"svartalf <self@svartalf.info>",
|
||||
"Yuki Okushi <huyuumi.dev@gmail.com>",
|
||||
@ -10,9 +10,9 @@ keywords = ["http", "web", "framework", "authentication", "security"]
|
||||
homepage = "https://actix.rs"
|
||||
repository = "https://github.com/actix/actix-extras.git"
|
||||
categories = ["web-programming::http-server"]
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2018"
|
||||
rust-version = "1.60"
|
||||
license.workspace = true
|
||||
edition.workspace = true
|
||||
rust-version.workspace = true
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
rustdoc-args = ["--cfg", "docsrs"]
|
||||
@ -24,7 +24,7 @@ actix-web = { version = "4.1", default-features = false }
|
||||
|
||||
base64 = "0.21"
|
||||
futures-core = "0.3.7"
|
||||
futures-util = { version = "0.3.7", default-features = false, features = ["std"] }
|
||||
futures-util = { version = "0.3.17", default-features = false, features = ["std"] }
|
||||
log = "0.4"
|
||||
pin-project-lite = "0.2.7"
|
||||
|
||||
|
@ -3,9 +3,9 @@
|
||||
> HTTP authentication schemes for [Actix Web](https://actix.rs).
|
||||
|
||||
[](https://crates.io/crates/actix-web-httpauth)
|
||||
[](https://docs.rs/actix-web-httpauth/0.8.0)
|
||||
[](https://docs.rs/actix-web-httpauth/0.8.1)
|
||||

|
||||
[](https://deps.rs/crate/actix-web-httpauth/0.8.0)
|
||||
[](https://deps.rs/crate/actix-web-httpauth/0.8.1)
|
||||
|
||||
## Documentation & Resources
|
||||
|
||||
|
@ -89,6 +89,12 @@ impl BasicAuth {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<Basic> for BasicAuth {
|
||||
fn from(basic: Basic) -> Self {
|
||||
Self(basic)
|
||||
}
|
||||
}
|
||||
|
||||
impl FromRequest for BasicAuth {
|
||||
type Future = Ready<Result<Self, Self::Error>>;
|
||||
type Error = AuthenticationError<Challenge>;
|
||||
|
@ -102,7 +102,7 @@ impl FromRequest for BearerAuth {
|
||||
let bearer = req
|
||||
.app_data::<Config>()
|
||||
.map(|config| config.0.clone())
|
||||
.unwrap_or_else(Default::default);
|
||||
.unwrap_or_default();
|
||||
|
||||
AuthenticationError::new(bearer)
|
||||
}),
|
||||
|
@ -55,7 +55,7 @@ impl Scheme for Basic {
|
||||
|
||||
let mut parts = header.to_str()?.splitn(2, ' ');
|
||||
match parts.next() {
|
||||
Some(scheme) if scheme == "Basic" => (),
|
||||
Some("Basic") => (),
|
||||
_ => return Err(ParseError::MissingScheme),
|
||||
}
|
||||
|
||||
|
@ -50,7 +50,7 @@ impl Scheme for Bearer {
|
||||
let mut parts = header.to_str()?.splitn(2, ' ');
|
||||
|
||||
match parts.next() {
|
||||
Some(scheme) if scheme == "Bearer" => {}
|
||||
Some("Bearer") => {}
|
||||
_ => return Err(ParseError::MissingScheme),
|
||||
}
|
||||
|
||||
|
@ -1 +0,0 @@
|
||||
msrv = "1.60"
|
Loading…
x
Reference in New Issue
Block a user