Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-9049

REST Api should report user and version of xwiki used for the response

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 4.5.3, 5.0
    • Fix Version/s: 5.1-milestone-1
    • Component/s: REST
    • Labels:
      None
    • Difficulty:
      Unknown
    • Documentation:
      N/A
    • Pull Request Status:
      Pull Request accepted
    • Similar issues:

      Description

      When we make REST calls and pass authentication to it (in form of a cookie for instance), we won't receive an error of the authentication has been lost. Instead the rest api will response as if it was a guest request. This does not allow client applications to verify if the user is still properly connected.

      To fix this I propose to add response headers to pass the user finally authenticated in the header "XWiki-User"

      At the same time we can pass the "XWiki-Version" header which could also be usefull to make version specific treatments to the data. Currently you would have to do an additional request to know the XWiki version.

      This are usefull changes for the Mobile client.

        Attachments

          Activity

            People

            • Assignee:
              sdumitriu Sergiu Dumitriu
              Reporter:
              ludovic Ludovic Dubost
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: