From 1a0ddff82b2d1ffb1a9f0406f80b49431e46dd16 Mon Sep 17 00:00:00 2001 From: apahomov Date: Mon, 14 Jan 2013 10:54:48 +0400 Subject: [PATCH] Get auth token from JSON request. --- flask_security/decorators.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/flask_security/decorators.py b/flask_security/decorators.py index 5787679..930df56 100644 --- a/flask_security/decorators.py +++ b/flask_security/decorators.py @@ -48,6 +48,8 @@ def _check_token(): args_key = _security.token_authentication_key header_token = request.headers.get(header_key, None) token = request.args.get(args_key, header_token) + if request.json: + token = request.json.get(args_key, token) serializer = _security.remember_token_serializer try: