Uploaded image for project: 'Help-Desk'
  1. Help-Desk
  2. HELP-6908

FIWARE.Question.Tech.Apps.ApplicationMashup.IdMIntegration.IncompleteOrganizationList

    Details

      Description

      Created question in FIWARE Q/A platform on 12-07-2016 at 20:07
      Please, ANSWER this question AT http://stackoverflow.com/questions/38336192/x-auth-token-sent-from-wirecloud-widget-does-not-correspond-with-x-auth-token-he

      Question:
      X-Auth-Token sent from Wirecloud widget does not correspond with X-Auth-Token header that came from Wilma PEP Proxy

      Description:
      In our Wirecloud widget we want to pass the logged in users access_token from Keyrock idm to our Wilma PEP Proxy, which in turn must be sent to our API. This is the call in our widget:

      if (MashupPlatform.context.get('fiware_token_available')) {
      MashupPlatform.http.makeRequest(url, {
      //method: "GET",
      requestHeaders:

      { "Accept": "application/json", "X-FI-WARE-OAuth-Token": "true", "X-FI-WARE-OAuth-Header-Name": "X-Auth-Token", }

      ,
      onSuccess: function(response)

      { updateWidget(response.responseText); }

      }); }

      The access_token in the header is valid (tested it with Postman) and i can retrieve the logged in users details, such as organization, roles etc...:

      {
      "organizations": [
      {
      "website": "",
      "description": "test",
      "roles": [

      { "name": "testRole1", "id": "23456" }

      ,

      { "name": "testRole2", "id": "1234567" }

      ],
      "enabled": true,
      "id": "testtest",
      "domain_id": "default",
      "name": "organizationName"
      }
      ],
      "displayName": "user1",
      "roles": [],
      "app_id": "1234567890",
      "email": "email@email.com",
      "id": "user-1"
      }

      However, the access_token being sent from our Wilma PEP Proxy to our API is totally different, it's like the incoming access_token is totally being ignored. When i do a call to retrieve the users information based on this access_token this is returned:

      { "organizations": [], "displayName": "user1", "roles": [], "app_id": "1234567890", "email": "email@email.com", "id": "user-1" }

      Why are the access_tokens different, shouldn't the access_token being placed in the HTTP header in the request of our widget be the same as the access_token that our API is getting from the Wilma PEP Proxy? We need to be able to retrieve organizations for the logged in idm user, now this is empty which causes our own API call to fail.

      Any help would be greatly appreciated .

        Activity

        fla Fernando Lopez made changes -
        Fix Version/s 2021 [ 12600 ]
        aarranz Álvaro Arranz made changes -
        Summary FIWARE.Question.Tech.Apps.ApplicationMashup.X-Auth-Token sent from Wirecloud widget does not correspond with X-Auth-Token header that came from Wilma PEP Proxy FIWARE.Question.Tech.Apps.ApplicationMashup.IdMIntegration.IncompleteOrganizationList
        backlogmanager Backlog Manager made changes -
        Summary [fiware-stackoverflow] X-Auth-Token sent from Wirecloud widget does not correspond with X-Auth-Token header that came from Wilma PEP Proxy FIWARE.Question.Tech.Apps.ApplicationMashup.X-Auth-Token sent from Wirecloud widget does not correspond with X-Auth-Token header that came from Wilma PEP Proxy
        HD-Node Unknown [ 10852 ]
        backlogmanager Backlog Manager made changes -
        Resolution Done [ 10000 ]
        Status Answered [ 10104 ] Closed [ 6 ]
        backlogmanager Backlog Manager made changes -
        Status In Progress [ 3 ] Answered [ 10104 ]
        backlogmanager Backlog Manager made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        backlogmanager Backlog Manager made changes -
        Assignee Álvaro Arranz [ aarranz ]
        backlogmanager Backlog Manager made changes -
        HD-Chapter Unknown [ 10845 ] Apps [ 10836 ]
        mev Manuel Escriche made changes -
        HD-Enabler Unknown [ 10910 ] Wirecloud [ 10857 ]
        backlogmanager Backlog Manager made changes -
        HD-Enabler Unknown [ 10910 ]
        HD-Chapter Unknown [ 10845 ]
        HD-Node Unknown [ 10852 ]
        backlogmanager Backlog Manager made changes -
        Field Original Value New Value
        Component/s FIWARE-TECH-HELP [ 10278 ]
        backlogmanager Backlog Manager created issue -

          People

          • Assignee:
            aarranz Álvaro Arranz
            Reporter:
            backlogmanager Backlog Manager
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: