Uploaded image for project: 'dlux'
  1. dlux
  2. DLUX-22

Authentification header is not appended when using apidoc/apis when using Restangular in DLUX

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Resolution: Done
    • unspecified
    • None
    • General
    • None
    • Operating System: Linux
      Platform: PC

    • 2989

    Description

      When calling apidoc/apis with Restangular, the authentification token is not passed to header:
      GET /apidoc/apis HTTP/1.1
      Host: localhost:8181
      Connection: keep-alive
      Accept: application/json, text/plain, /
      Origin: http://localhost:9000
      User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.118 Safari/537.36
      Referer: http://localhost:9000/index.html
      Accept-Encoding: gzip, deflate, sdch
      Accept-Language: en-GB,en-US;q=0.8,en;q=0.6

      e.g. restconf/modules call header looks like this:
      GET /restconf/modules HTTP/1.1
      Host: localhost:8181
      Connection: keep-alive
      Accept: application/json, text/plain, /
      Origin: http://localhost:9000
      User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.118 Safari/537.36
      Authorization: Basic YWRtaW46YWRtaW4=
      Referer: http://localhost:9000/index.html
      Accept-Encoding: gzip, deflate, sdch
      Accept-Language: en-GB,en-US;q=0.8,en;q=0.6

      Restangular used to call this APIs is defined as:
      yangUtils.factory('YangUtilsRestangular', ['Restangular', 'ENV',
      function (Restangular, ENV) {
      var r = Restangular.withConfig(function(RestangularConfig)

      { RestangularConfig.setBaseUrl(ENV.getBaseURL("MD_SAL")); }

      );

      return r;
      }]);

      The calls are executed as:
      YangUtilsRestangular.one('restconf').one('modules')... (for working restconf/modules API)
      YangUtilsRestangular.one('apidoc').one('apis')... (for not working apidoc/apis API)

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              harmasin@cisco.com Harman Singh
              jsebin@cisco.com Juraj Sebin
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: