Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Add multitype capability to TokenAuthenticationMiddleware #34
Currently, if we want to secure routes with a
In multi-role systems (ie. blog), we usually have multiple different user types (which do not necessarily share a common superclass). Therefore, we often want to secure routes with a middleware that would allow us to specify multiple different types where one of them has to be authenticated for the route to be executed.
After some discussion with @tanner0101, a possible solution could be a new "non-throwing"
I've been playing around with this a bit and here is the rough version of how I managed to achieve this.
Above routes will be protected with bearer authentication, allowing only