Details
-
Type: Monitor
-
Status: Closed
-
Priority: Major
-
Resolution: Done
-
Affects Version/s: None
-
Fix Version/s: 2021
-
Component/s: FIWARE-TECH-HELP
-
Labels:
-
HD-Chapter:Apps
-
HD-Enabler:Wirecloud
Description
Created question in FIWARE Q/A platform on 01-05-2016 at 01:05
Please, ANSWER this question AT http://stackoverflow.com/questions/36961272/fiware-wirecloud-error-using-x-fi-ware-oauth-token-request-header
Question:
FIWARE Wirecloud: Error using X-FI-WARE-OAuth-Token request header
Description:
We are part of the FINISH accelerator and are deploying Wirecloud and KeyRock on our own servers using the docker containers provided by fiware.
We have KeyRock-IdM set up and linked to Wirecloud. We are trying to pass the logged-in users token to an API which returns data to a widget.
We found documentation about the "X-FI-WARE..." headers in the github code and wrote a test widget (main.js shown below). When deployed on the fiware labs instance, it works out of the box. When deployed on our local installation with a docker container it gives the following error: "Current user has not an active FIWARE profile". I scoured the settings.py file but have no idea where this error is coming from. I have DEBUG=True but nothing show up in the log. The user running the widget was logged in through the KeyRock IdM.
/*jshint globalstrict:true */
/global MashupPlatform, ObjectStorageAPI, StyledElements/
(function () {
"use strict";
var token_available = MashupPlatform.context.get('fiware_token_available');
var username = MashupPlatform.context.get('username');
alert(username + " has token?: " + token_available);
var url = MashupPlatform.prefs.get('keyRock_url');
var request = MashupPlatform.http.makeRequest(url, {
requestHeaders:
,
method: "GET",
onSuccess: function (response)
,
onFailure: function (response)
,
onComplete: function () {
}
}
);
})();
How can i find out what is going wrong?
2016-05-06 18:05|UPDATED status: transition Finish| # answers= 3, accepted answer= True