Is there a nancy equivalent of flasks' decorators?
NateKomodo opened this issue · comments
Nate Komodo commented
Description
In flask, you can put something like @login_required
over a route, and code will be run before the route, such as that of verifying the user has a specific cookie, or is logged in, and can also pass in more arguments into the method, such as a user pbject. Does nancy have an equivalent of this? If so, how do I implement it?
Jonathon Rossi commented
The docs discuss authentication including the RequiresAuthentication
extension method.
https://github.com/NancyFx/Nancy/wiki/Authentication-overview