[Fiware-creatifi-coaching] [CreatiFI Benelux Hub] FIWARE Lab IDM issue

Andrea Maestrini amaestrini at create-net.org
Tue Jul 21 08:33:49 CEST 2015


Dear FIWARE coach,
we received an updated from a CreatiFI applicants.
Thanks in advance.

*****************************
What I understand from the instructions on the github link you provided is:

   - *not* that the *body is incorrect* as you suggested?!
   - but the *current FIWARE IDM implementation does not support the
   *grant_type=client_credentials* anymore*: *"Currently we support two
   grant types, the Authorization Code Grant and the Resource Owner Password
   Credentials Grant."* Correct?

So in short with the current FIWARE Account IDM it is not possible to
perform Application/Service to Service Calls Using Client Credentials (not
user)? *I just want my applications to authenticate itself*, it does not
have a user defined but I just want to be sure the application is allowed
to use my backend api's.

So the video instructions I followed on [[
https://edu.fiware.org/mod/page/view.php?id=235]] are not valid anymore for
the current FIWARE Account IDM implementation? Or am I mistaken?

Best regards,
Jan

*****************************

On Tue, Jul 14, 2015 at 8:44 AM, Andrea Maestrini <amaestrini at create-net.org
> wrote:

> Dear FIWARE coach,
> we received an updated from a CreatiFI applicants who is asking for news
> about his issue.
> CreatiFI phase 1 finishes on 15th of July.
> The developer needs an answer asap.
> Could you provide some hints?
> Thanks in advance.
>
> On Mon, Jul 13, 2015 at 8:30 AM, Andrea Maestrini <
> amaestrini at create-net.org> wrote:
>
>> Dear FIWARE coach,
>> we forward you a support request received from a CreatiFI applicant we
>> are not able to solve.
>> Please let us know if you need direct contact with the submitter.
>> Thanks.
>>
>> *************************************
>>
>> Hi,
>>
>> I am trying to get an access token using FIWARE Lab IDM.
>> I have accounts created and the application is defined.
>> Everything works fine for authorization code grant.
>> But when I want to get an access token only using client_id and
>> client_secret (client credentials grant) I get an internal server error.
>> See my code below (which I got from the educational videos), I have
>> omitted my client_id and client_secret of course:
>>
>> var basic = new Buffer(client_id + ':' + client_secret).toString('base64');
>>     var body = 'grant_type=client_credentials';
>>
>> var options = {
>>         hostname: 'account.lab.fiware.org',
>>         port: 443,
>>         path: '/oauth2/token',
>>         method: 'POST',
>>         headers: {
>>             'Authorization': 'Basic ' + basic,
>>             'Content-Type': 'application/x-www-form-urlencoded',
>>             'Content-Length': body.length
>>         }
>>     };
>>
>> var req = https.request(options, function(res) {
>>         res.setEncoding('utf8');
>>         res.on('data', function(data) {
>>             if(res.statusCode === 200) {
>>                 var resp = JSON.parse(data);
>>                 var token = resp['access_token'];
>>                 console.log('Token: ' + token);
>>             }
>>             else {
>>                 console.log(data);
>>             }
>>         });
>>     });
>>
>> req.write(body);
>>     req.end();
>>
>> And this is the JSON response I get back: {"error": {"message": "An
>> unexpected error prevented the server from fulfilling your request.",
>> "code": 500, "title": "Internal Server Error"}}
>>
>> thxs
>>
>> *************************************
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.fiware.org/private/fiware-creatifi-coaching/attachments/20150721/f90e86fa/attachment.html>


More information about the Fiware-creatifi-coaching mailing list

You can get more information about our cookies and privacy policies clicking on the following links: Privacy policy   Cookies policy