All this would be amazing coupled with angularjs…
Edit Oh, and I join the question: what about flask-restful?
All this would be amazing coupled with angularjs…
Edit Oh, and I join the question: what about flask-restful?
Authentication policies will use a similar style to the renderers and parsers (and all of REST framework). You'll be able to set them per-view with a decorator, or set them system-wide in the config. You'll also be able to support multiple authentication policies.
Too much complexity added to project. Going REST patch is problematic when you have to integrate with with server-render style lib or service. SEO is shit. Angular doc is worse.
Auth is base on tokens, no sessions. I reused the ideas from here https://github.com/mrgamer/angular-login-example
def auth_required(f): @wraps(f) def wrapper(args, *kwargs): token = request.headers.get("X-Token") if token is None: abort(400) user = User.verify_auth_token(token, app.config["SECRET_KEY"])
If you don't make very heavy SPA like photoshop, don't use angular.
[1] http://blog.miguelgrinberg.com/post/restful-authentication-w...