summaryrefslogtreecommitdiff
path: root/service/pixelated/resources/login_resource.py
diff options
context:
space:
mode:
authorTulio Casagrande <tcasagra@thoughtworks.com>2017-02-13 15:23:11 -0200
committerTulio Casagrande <tcasagra@thoughtworks.com>2017-02-13 15:23:11 -0200
commit7fdf9f62c785835c4ea0863dae36bee9611221a5 (patch)
tree450662487d2489d78491bc56d04aa65c451ce2e6 /service/pixelated/resources/login_resource.py
parent0edf2078caf98be00bcd48846acec563df630616 (diff)
[#907] Change login status to return json
with @anikarni
Diffstat (limited to 'service/pixelated/resources/login_resource.py')
-rw-r--r--service/pixelated/resources/login_resource.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/service/pixelated/resources/login_resource.py b/service/pixelated/resources/login_resource.py
index 77ebca70..4bbceb89 100644
--- a/service/pixelated/resources/login_resource.py
+++ b/service/pixelated/resources/login_resource.py
@@ -20,7 +20,7 @@ from xml.sax import SAXParseException
from pixelated.authentication import Authenticator
from pixelated.config.leap import BootstrapUserServices
from pixelated.resources import BaseResource, UnAuthorizedResource, IPixelatedSession
-from pixelated.resources import get_startup_folder
+from pixelated.resources import get_startup_folder, respond_json
from twisted.cred.error import UnauthorizedLogin
from twisted.internet import defer
from twisted.logger import Logger
@@ -176,4 +176,5 @@ class LoginStatusResource(BaseResource):
def render_GET(self, request):
session = IPixelatedSession(request.getSession())
- return format(session.check_login_status())
+ response = {'status': str(session.check_login_status())}
+ return respond_json(response, request)