stormpath-flask icon indicating copy to clipboard operation
stormpath-flask copied to clipboard

Allow login_required for entire app

Open stefanv opened this issue 10 years ago • 2 comments

It would be great if one could specify global authentication requirements, and then only apply exceptions. E.g., in the web app I'm working on all pages other than the landing page should be authenticated, and I'd prefer not having to decorate each new route added.

stefanv avatar Apr 15 '15 01:04 stefanv

This is a great suggestion, thank you!

rdegges avatar Apr 19 '15 02:04 rdegges

This might best be done using Flask's before_request decorator as discussed at http://stackoverflow.com/questions/13428708/best-way-to-make-flask-logins-login-required-the-default.

Not sure this is something that needs to go into the flask-stormpath core though as there are generic ways for dealing with this in your application already.

jcass77 avatar Sep 18 '16 19:09 jcass77