biscuit-auth / biscuit-actix-middleware Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
Currently, the following behaviours are hardcoded:
Ideally, users should be able to:
Request -> Result<Vec<u8>, E>
);&[u8] -> Result<Biscuit, E>
)Notes:
PublicKey
, or an Option<u32> -> PublicKey
. That might not be the simplest way to do things;This crate provides optional integration with tracing
we should document how to set things up and show how it integrates with the wider actix ecosystem.
The exposed middleware only handles token parsing (and verification), not authorization.
This is done on purpose: authorization is usually specific to each endpoint, while a middleware is called before routing and does not have access to endpoint-specific data.
In some cases, however, authorization can be expressed in a common way across all endpoints.
In that case, being able to do it in a middleware is a good thing:
This use case is quite different from the one already covered, so i think it should be a different middleware, not a knob on the existing one (even though the actual implementation could be shared between the two middlewares).
Same as for #5, it will be important to strike a good balance between configurability and purpose. For reference, here is what I came up with for the same use case in Haskell https://hackage.haskell.org/package/biscuit-wai-0.1.0.0/candidate/docs/Network-Wai-Middleware-Biscuit.html#t:AuthorizationConfig
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.