diff options
Diffstat (limited to 'server')
-rw-r--r-- | server/handlers.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/server/handlers.py b/server/handlers.py index 5439d19..93818f0 100644 --- a/server/handlers.py +++ b/server/handlers.py @@ -276,13 +276,21 @@ class EndProblem(CodeqService): request.end() - class GetUserStat(CodeqService): def process(self, request): stat = request.session.get_stat() request.reply({'code': 0, 'stat': stat}) +class SamlLogin(CodeqService): + def process(self, request): + data = request.data.get('data') + if data is None: + request.reply({'code': 1, 'message': 'SAML user data not specified'}) + else: + request.reply({'code': 0, 'message': 'OK'}) # TODO: implement login using SAML credentials + + # maps actions to their handlers incoming_handlers = { 'create_session': CreateSession(), @@ -301,7 +309,8 @@ incoming_handlers = { 'test': Test(), 'load_problem': LoadProblem(), 'end_problem': EndProblem(), - 'user_stat': GetUserStat() + 'user_stat': GetUserStat(), + 'saml_login': SamlLogin() } |