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

58 Commits

Author SHA1 Message Date
Joseph McCormick
1ed893a08c
Feature: Add IdentityError to actix-identity crate. (#296)
* Add IdentityError to actix-identity crate.

In order to let crates in the actix web ecosystem interact correctly
with `actix_web::Error`, this commit introduces its own error type,
replacing the previous usage of `anyhow::Error`.

* Mend some clippy warnings on IdentityError.

* Split identity error into more granular versions.

- `MissingIdentityError` occurs whenever we attempt to gather
  information about an identity from a session, and fail.
- `LoginError` occurs whenever we attempt to login via an identity, and
  fail.

* Feedback for identity error implementation.

- `IdentityError` -> `GetIdentityError`
- Move error messages into Display impl where appropriate
- Split `id` and `get_identity` errors into two types
- Implement `source` on custom errors

* Expand identity error types with struct markers.

In order to get a little more future compatibility and reduce
abstraction leaking, this commit introduces some contextual structs to
our identity errors package.

* Improve doc message for SessionExpiryError.

Co-authored-by: Luca Palmieri <20745048+LukeMathWalker@users.noreply.github.com>

* Improve identity error docs and messaging.

Co-authored-by: Luca Palmieri <20745048+LukeMathWalker@users.noreply.github.com>

* Expand LostIdentityError with placeholder.

Adds a placeholder unit struct to the LostIdentityError variant of
GetIdentityError, which should let us expand on that variant with extra
context later if we like.

* Add From coercion for LostIdentityError.

Improve the ergonomics of using the LostIdentityError unit struct.

* Update Cargo.toml

* Update CHANGES.md

* expose identity error module

* fix error impl

Co-authored-by: Luca Palmieri <20745048+LukeMathWalker@users.noreply.github.com>
Co-authored-by: Rob Ede <robjtede@icloud.com>
2023-01-07 02:05:12 +00:00
Rob Ede
f8a1165d10
fix manifest 2023-01-07 01:17:45 +00:00
Rob Ede
e9428ba261
update env_logger dev dep 2023-01-07 01:08:01 +00:00
Rob Ede
07c5176bd0
align descriptions 2022-07-21 03:07:06 +01:00
Rob Ede
553c2bfb92
prepare actix-identity release 0.5.2 2022-07-19 01:33:53 +01:00
Rob Ede
1cc37c371e
prepare actix-identity release 0.5.1 2022-07-11 18:07:50 +01:00
Rob Ede
d853c115b6
trim unnecessary identity deps (#259)
* trim unnecessary identity deps

* update changelog
2022-07-11 18:07:26 +01:00
Rob Ede
603215095a
prepare actix-identity release 0.5.0 2022-07-11 13:39:14 +01:00
Rob Ede
c52ea7a5d2
prepare actix-session release 0.7.0 2022-07-09 19:03:28 +01:00
Luca Palmieri
b1cea64795
Rebuild actix-identity on top of actix-session (#246)
Co-authored-by: Rob Ede <robjtede@icloud.com>
2022-07-09 19:00:15 +01:00
Rob Ede
2e86fb9822
prepare actix-identity release 0.4.0 2022-03-01 04:13:56 +00:00
Rob Ede
73a5ae98b6
update actix-web dependency to 4.0 2022-02-25 23:05:11 +00:00
Rob Ede
f9beeecaf6
prepare actix-identity release 0.4.0-beta.9 2022-02-07 02:52:24 +00:00
Rob Ede
323d01fcca
bump actix-web to 4.0.0-rc.1 2022-02-03 22:33:47 +00:00
Rob Ede
bb900a41fc
prepare actix-identity release 0.4.0-beta.8 2022-01-21 20:43:39 +00:00
Rob Ede
4e72e3d8ec
update actix-identity to aw4b21 2022-01-21 20:42:58 +00:00
Rob Ede
88859af6a5
prepare actix-identity release 0.4.0-beta.7 2021-12-29 10:25:17 +00:00
Rob Ede
0d12201073
update to actix web v4 beta 18 (#218) 2021-12-29 10:22:56 +00:00
Luca Palmieri
14a622092d
Update to actix-web beta.17 (#217) 2021-12-29 09:25:52 +00:00
Rob Ede
6676a50944
actix-web beta 15 updates (#216) 2021-12-18 03:37:23 +00:00
Rob Ede
e83c488544
prepare actix-identity release 0.4.0-beta.5 2021-12-12 19:13:16 +00:00
Rob Ede
74ec115161
migrate to actix-web beta 14 (#209) 2021-12-11 16:05:21 +00:00
Rob Ede
56051786a6
standardize future types to ones from actix_utils 2021-12-08 07:29:12 +00:00
Rob Ede
37532fd1eb
prepare actix-identity release 0.4.0-beta.4 2021-11-22 23:20:33 +00:00
Rob Ede
0999159877
prepare actix-identity release 0.4.0-beta.3 2021-10-21 18:30:03 +01:00
Chiu-Hsiang Hsu
545873b5b2
update actix-web dependencies to v4 beta.10 (#203)
Co-authored-by: Rob Ede <robjtede@icloud.com>
2021-10-21 14:10:00 +01:00
Rob Ede
44c7b07ce2
prepare second beta round (#189) 2021-06-27 07:28:26 +01:00
Rob Ede
20ef05c36e
fix doctest ci (#188) 2021-06-27 07:02:38 +01:00
Rob Ede
bb1cc7443f
prepare identity release 0.4.0-beta.1 2021-04-02 11:44:03 +01:00
Rob Ede
23912afd49
refactor identity (#168) 2021-03-23 05:05:03 +00:00
Rob Ede
c7df62d0b6
simplify ci like actix-web (#165) 2021-03-22 11:46:02 +00:00
Rob Ede
7d0df351e0
normalize time deps to secure versions 2021-03-22 05:20:10 +00:00
Rob Ede
2254a429d4
use forward_ready for service definitions 2021-03-22 05:18:59 +00:00
Andrey Kutejko
ca85f6b245
Update dependencies (Tokio 1.0) (#144) 2021-03-21 22:50:26 +00:00
Yuki Okushi
f970d90894
Use re-exported bytes items from instead of using them directly (#139) 2020-12-01 10:21:56 +09:00
Francois Stephany
0f7a147323
Unify homepage/repository urls in Cargo manifests (#111) 2020-10-03 01:32:01 +01:00
Rob Ede
03ccf09e2e
prepare identity 0.3.1 release (#104) 2020-09-21 23:05:40 +01:00
Rob Ede
4a546718aa
prepare v3 compatible releases (#95) 2020-09-11 21:22:55 +01:00
Rob Ede
bad5f32a68
update all packages to use actix-web v3 (#94) 2020-09-11 16:26:15 +01:00
Yuki Okushi
2ae3c80548
Use OR instead of deprecated / in license field (#80) 2020-07-14 11:16:32 +01:00
Yuki Okushi
dd7ee27388
Bump up to 0.3.0-alpha.1 2020-03-15 06:15:22 +09:00
Yuki Okushi
a3ebc8ca66
Minimize futures dependency 2020-03-15 05:44:29 +09:00
Yuki Okushi
570209c1b1
identity: Update actix-web dependency to 3.0.0-alpha.1 2020-03-13 06:01:39 +09:00
Rob Ede
90e00f7344
fix badge links 2020-01-30 01:50:18 +00:00
kevinpoitra
e634e64847 Upgrade time to 0.2.5 (#1254)
* Use `OffsetDateTime` instead of `PrimitiveDateTime`

* Parse time strings with `PrimitiveDateTime::parse` instead of `OffsetDateTime::parse`

* Remove unused `time` dependency from actix-multipart

* Fix a few errors with time related tests from the `time` upgrade

* Implement logic to convert a RFC 850 two-digit year into a full length year, and organize time parsing related functions

* Upgrade `time` to 0.2.2

* Correctly parse C's asctime time format using time 0.2's new format patterns

* Update CHANGES.md

* Use `time` without any of its deprecated functions

* Enforce a UTC time offset when converting an `OffsetDateTime` into a Header value

* Use the more readable version of `Duration::seconds(0)`, `Duration::zero()`

* Remove unneeded conversion of time::Duration to std::time::Duration

* Use `OffsetDateTime::as_seconds_f64` instead of manually calculating the amount of seconds from nanoseconds

* Replace a few additional instances of `Duration::seconds(0)` with `Duration::zero()`

* Truncate any nanoseconds from a supplied `Duration` within `Cookie::set_max_age` to ensure two Cookies with the same amount whole seconds equate to one another

* Fix the actix-http:🍪:do_not_panic_on_large_max_ages test

* Convert `Cookie::max_age` and `Cookie::expires` examples to `time` 0.2

Mainly minor  changes. Type inference can be used alongside the new
`time::parse` method, such that the type doesn't need to be specified.
This will be useful if a refactoring takes place that changes the type.
There are also new macros, which are used where possible.

One change that is not immediately obvious, in `HttpDate`, there was an
unnecessary conditional. As the time crate allows for negative durations
(and can perform arithmetic with such), the if/else can be removed
entirely.

Time v0.2.3 also has some bug fixes, which is why I am not using a more
general v0.2 in Cargo.toml.

v0.2.3 has been yanked, as it was backwards imcompatible. This version
reverts the breaking change, while still supporting rustc back to
1.34.0.

* Add missing `time::offset` macro import

* Fix type confusion when using `time::parse` followed by `using_offset`

* Update `time` to 0.2.5

* Update CHANGES.md

Co-authored-by: Jacob Pratt <the.z.cuber@gmail.com>
2020-01-28 20:44:22 +09:00
Nikolay Kim
f6ff056b8a Fix panic with already borrowed: BorrowMutError #1263 2020-01-10 11:26:54 +06:00
Nikolay Kim
c7f3915779 update actix-service dep 2019-12-22 16:39:25 +04:00
Nikolay Kim
8b8a9a995d bump ver 2019-12-20 17:36:48 +06:00
Nikolay Kim
fac6dec3c9 update deps 2019-12-13 12:36:15 +06:00
Nikolay Kim
131c897099 upgrade to actix-net release 2019-12-11 19:20:20 +06:00