summaryrefslogtreecommitdiffstats
path: root/roles/ipsilon/files/api.py
diff options
context:
space:
mode:
Diffstat (limited to 'roles/ipsilon/files/api.py')
-rw-r--r--roles/ipsilon/files/api.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/roles/ipsilon/files/api.py b/roles/ipsilon/files/api.py
index dd0f8b05c..f0ebb17ef 100644
--- a/roles/ipsilon/files/api.py
+++ b/roles/ipsilon/files/api.py
@@ -45,6 +45,14 @@ class APIV1Page(Page):
return json.dumps(self._perform_call(kwargs))
def _perform_call(self, arguments):
+ required_arguments = ['auth_module', 'username', 'password']
+ for arg in required_arguments:
+ if not arg in arguments:
+ return {'success': False,
+ 'status': 400,
+ 'message': 'Missing argument: %s' % arg
+ }
+
fas = self.root_obj.login.fas.lm
openid = self.root_obj.openid