Description of problem: If user name is missing in login on behalf request, SSO should respond back with a proper error message Version-Release number of selected component (if applicable): 4.0 How reproducible: Steps to Reproduce: 1. curl -v -k -H "Accept: application/json" 'http://127.0.0.1:8080/ovirt-engine/sso/oauth/token?grant_type=password&username2=admin@internal&password=1&client_id=ovirt-engine&client_secret=secret&scope=ovirt-ext=token:login-on-behalf' Actual results: {"error_code":"server_error","error":null} Expected results: {"error_code":"invalid_request","error":"Invalid request, parameter 'username' not found or contains invalid value."}
Verified with: rhevm-4.1.1-0.1.el7.noarch curl -k -v -H "Accept: application/json" 'https://ge2.redhat.com/ovirt-engine/sso/oauth/token?grant_type=password&username2=admin@internal&password=1&client_id=ovirt-engine&client_secret=secret&scope=ovirt-ext=token:login-on-behalf' ... * Connection #0 to host ge2.redhat.com left intact {"error_code":"invalid_request","error":"Invalid request, parameter 'username' not found or contains invalid value."}%