Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-4175

replace XHR with the fetch() API to allow SSO redirect handling

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Later
    • Resolution: Done
    • Affects Version/s: 8.6.0.1
    • Fix Version/s: 9.5.0
    • Component/s: ZK Client Engine
    • Security Level: Jimmy
    • Labels:
      None
    • Environment:

      modern browsers

    • gh.sprint.customfield.default.name:
      ZK 9.0.0 S0

      Description

      SSO redirects (302) pose a common recurring issue when SSO filters intercept ZK's AJAX requests.

      While the XMLHttpRequest (XHR) API doesn't provide a mechanism to handle redirects at client side, the modern fetch API does ->
      https://fetch.spec.whatwg.org/#concept-request-redirect-mode describes that redirects can be treated like *error*s or handled *manual*ly at client side

      Replacing the older XHR with the new fetch() (or a polyfill) would open a way for more intuitive way when dealing with SSO solutions (at least for modern browsers)

      NOTE: the API is still marked as experimental (2018-12) so we should observe this API and decide when to integrate it (or use a polyfill as a fallback)

      https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch
      https://caniuse.com/#feat=fetch

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Leon03 Leon03
              Reporter:
              cor3000 cor3000
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 4 days
                  4d
                  Remaining:
                  Remaining Estimate - 4 days
                  4d
                  Logged:
                  Time Spent - Not Specified
                  Not Specified