Merge pull request #40 from coreos-inc/verifyfix

Have the verifyUser endpoint use the same confirm_existing_user method
This commit is contained in:
josephschorr 2015-05-22 16:30:25 -04:00
commit f5dc3c2a5a

View file

@ -537,7 +537,17 @@ class VerifyUser(ApiResource):
""" Verifies the signed in the user with the specified credentials. """
signin_data = request.get_json()
password = signin_data['password']
return conduct_signin(get_authenticated_user().username, password)
username = get_authenticated_user().username
(result, error_message) = authentication.confirm_existing_user(username, password)
if not result:
return {
'message': error_message,
'invalidCredentials': True,
}, 403
common_login(result)
return {'success': True}
@resource('/v1/signout')