Ipsilon API validate input
Fixes: ticket #4923 Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
This commit is contained in:
parent
352af83a5c
commit
82f404af0d
1 changed files with 8 additions and 0 deletions
|
@ -45,6 +45,14 @@ class APIV1Page(Page):
|
||||||
return json.dumps(self._perform_call(kwargs))
|
return json.dumps(self._perform_call(kwargs))
|
||||||
|
|
||||||
def _perform_call(self, arguments):
|
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
|
fas = self.root_obj.login.fas.lm
|
||||||
openid = self.root_obj.openid
|
openid = self.root_obj.openid
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue