Scopes-rs
scopes-rs is a strongly typed scoped authorization library.
Features
- Verify complex scope authorization policies
- Manipulate scopes in a strongly-typed fashion
- Generate boilerplate implementation with a derive macro
- Support for hierarchized scopes with the
hierarchyfeature
Usage example
use FromStr;
use ;
// You would usually parse the scopes from a request in a middleware with
// proper error handling, but this is sufficient here
The examples directory
contains some other examples of how to use this library.
The docs also provide more code snippets and examples.
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.