1
0
mirror of https://github.com/actix/actix-extras.git synced 2024-11-23 15:51:06 +01:00
actix-extras/actix-identity
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
..
examples Rebuild actix-identity on top of actix-session (#246) 2022-07-09 19:00:15 +01:00
src Feature: Add IdentityError to actix-identity crate. (#296) 2023-01-07 02:05:12 +00:00
tests/integration clippy 2023-01-07 01:04:16 +00:00
Cargo.toml Feature: Add IdentityError to actix-identity crate. (#296) 2023-01-07 02:05:12 +00:00
CHANGES.md Feature: Add IdentityError to actix-identity crate. (#296) 2023-01-07 02:05:12 +00:00
LICENSE-APACHE move identity service separate crate 2019-06-12 15:52:48 +06:00
LICENSE-MIT move identity service separate crate 2019-06-12 15:52:48 +06:00
README.md align descriptions 2022-07-21 03:07:06 +01:00

actix-identity

Identity management for Actix Web.

crates.io Documentation Apache 2.0 or MIT licensed Dependency Status

Documentation & community resources