Uploaded image for project: 'OpenAM'
  1. OpenAM
  2. OPENAM-4179

Sample for REST logout is not complete - curl command is missing content type

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 12.0.0
    • Fix Version/s: 12.0.0
    • Component/s: documentation
    • Labels:
    • Rank:
      1|hzmjan:

      Description

      At the bottom of paragraph about Authentication & logout via REST: http://openam.forgerock.org/openam-documentation/openam-doc-source/doc/dev-guide/index.html#rest-api-auth-json (for easier access - it is right above there: http://openam.forgerock.org/openam-documentation/openam-doc-source/doc/dev-guide/index.html#rest-api-auth-legacy ) is incomplete description of REST request for logout:

      curl \
      --request POST \
      --header "iplanetDirectoryPro: AQIC5wM2LY4Sfc...jA1AAJTMQACMDE.*" \
      "http://openam.example.com:8080/openam/json/sessions/?_action=logout"
      

      result:

      {"code":400,"reason":"Bad Request","message":"The request could not be processed because it specified the content-type 'application/x-www-form-urlencoded' when only the content-type 'application/json' and 'multipart/form-data' are supported"}
      

      expected:

      {"result":"Successfully logged out"}
      

      missing part of request:

      --header "Content-Type: application/json" \
      

      working request:

      curl \
      --request POST \
      --header "iplanetDirectoryPro: AQIC5wM2LY4Sfc...jA1AAJTMQACMDE.*" \
      --header "Content-Type: application/json" \
      "http://openam.example.com:8080/openam/json/sessions/?_action=logout"
      

        Attachments

          Activity

            People

            • Assignee:
              David.Goldsmith David Goldsmith
              Reporter:
              tomas.hejret Tomas Hejret
              QA Assignee:
              Tomas Hejret
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: