Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-24392

REST API: create session with POST /user/sessions fails

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Invalid
    • Icon: Critical Critical
    • None
    • dev-master
    • Platform > REST API v2
    • None

    Description

      When attempting to create a new session using POST /user/sessions, the request will fail :

      # curl 'http://ez5.local/api/ezp/v2/user/sessions' \
       -H 'Content-Type: application/vnd.ez.api.SessionInput+json' \
       -H 'Accept: appication/vnd.ez.api.Session+json' \
       --data-binary '{"SessionInput":{"login":"admin","password":"publish"}}'
      {
          "ErrorMessage": {
              "_media-type": "application\/vnd.ez.api.ErrorMessage+json",
              "errorCode": 401,
              "errorMessage": "Unauthorized",
              "errorDescription": "User does not have access to '' 'Missing or invalid CSRF token'",
              "trace": "...",
              "file": "\/home\/ez5\/www\/vendor\/ezsystems\/ezpublish-kernel\/eZ\/Publish\/Core\/REST\/Server\/Controller\/User.php",
              "line": 997
          }
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            foxcore foxcore
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: