Actix Permissions

Permission and input validation extension for Actix Web. Alternative to actix guard, with access to app data injections, HttpRequest and Payload. Permissions are flexible, take a look at Examples directory for some of the use cases.
You could write a permission check like a function or like a struct.
This code:
async
is almost the same as writing:
;
Example
Dependencies:
[]
= "1.0.0-beta.1"
Code:
use *;
use Data;
use *;
use Deserialize;
async
;
async
async
Use Cases
Take a look at Examples directory.
You could use actix-permissions for role based authorization check, like in role-based-authorization example.
hello-world example is just a proof of concept, showing how you can set permission,
access service request, payload and injected services.
Permission Deny
By default, 403 is returned for failed permission checks. You may want to toggle between Unauthorized and Forbidden,
maybe customize 403 forbidden messages. That's why check_with_custom_deny is for.
Take a look at role based authorization example for more info.
Contributing
This project welcomes all kinds of contributions. No contribution is too small!
If you want to contribute to this project but don't know how to begin or if you need help with something related to this project, feel free to send me an email https://www.eisberg-labs.com/ (contact form at the bottom).
Some pointers on contribution are in Contributing.md
Code of Conduct
This project follows the Rust Code of Conduct.
License
Distributed under the terms of MIT license and Apache license.