Details
-
Bug
-
Status: Resolved
-
Resolution: Done
-
unspecified
-
None
-
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)
);
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
- blocks
-
DLUX-26 DLUX YANGUI embedded apidocs needs AuthN
- Resolved