Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-5501

JSON API logout doesn't work.

    XMLWordPrintable

    Details

    • Type: Incident report
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 2.0.0
    • Fix Version/s: None
    • Component/s: API (A)
    • Labels:
      None
    • Environment:
      Ubuntu 12.04

      Description

      There is no way to logout with JSON API.

      ##Attempt 1
      ##Request

      {"jsonrpc":"2.0","method":"user.logout","params":"dad016d2d1fc782ccdfec648327f96a1","auth":"dad016d2d1fc782ccdfec648327f96a1","id":9}

      ##Response
      {"jsonrpc":"2.0","error":

      {"code":-32602,"message":"Invalid params.","data":"JSON-rpc params is not an Array."}

      ,"id":9}

      ##Attempt 2
      ##Request

      {"jsonrpc":"2.0","method":"user.logout","params":["f463f3fc908972b66c0662b47363b1da"],"auth":"f463f3fc908972b66c0662b47363b1da","id":8}

      ##Response
      {"jsonrpc":"2.0","error":{"code":-32602,"message":"Invalid params.","data":"Cannot logout.","debug":[

      {"file":"\/usr\/share\/zabbix\/api\/classes\/CUser.php","line":884,"function":"exception","class":"CZBXAPI","type":"::","args":[100,"Cannot logout."]}

      ,

      {"function":"logout","class":"CUser","type":"->","args":[["f463f3fc908972b66c0662b47363b1da"]]}

      ,{"file":"\/usr\/share\/zabbix\/api\/rpc\/class.czbxrpc.php","line":106,"function":"call_user_func","args":[[{},"logout"],["f463f3fc908972b66c0662b47363b1da"]]},

      {"file":"\/usr\/share\/zabbix\/api\/rpc\/class.czbxrpc.php","line":64,"function":"callAPI","class":"czbxrpc","type":"::","args":["user.logout",["f463f3fc908972b66c0662b47363b1da"]]}

      ,

      {"file":"\/usr\/share\/zabbix\/api\/rpc\/class.cjsonrpc.php","line":66,"function":"call","class":"czbxrpc","type":"::","args":["user.logout",["f463f3fc908972b66c0662b47363b1da"],"f463f3fc908972b66c0662b47363b1da"]}

      ,

      {"file":"\/usr\/share\/zabbix\/api_jsonrpc.php","line":54,"function":"execute","class":"CJSONrpc","type":"->","args":[]}

      ]},"id":8}

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              mdobrinin Mikhail Dobrinin
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: