Here we are, you'll find attached a .txt with the specification of headers,
bodies and responses of the HTTP requests.
Thank you again,
Andrea
Il giorno ven 29 mag 2015 alle ore 13:30 Álvaro Alonso <aalonsog at dit.upm.es>
ha scritto:
> Hi Andrea,
>
> sorry to insist. But what I need is the final HTTP request your method
> sends. I’m not an expert in python so I can not analyse the request from
> the code.
>
> BR
> --
> Álvaro
>
> El 28 May 2015, a las 17:52, Andrea Orler <andrea.orler at gmail.com>
> escribió:
>
> Hi Álvaro!
>
> Thank you again for the effort you put in helping me.
> So, I'm sending you the Python class which handles the authentication
> process.
> For the HTTP requests, I'm using the Requests
> <http://docs.python-requests.org/en/latest/> library.
>
> Thank you again,
> Andrea Orler
>
> Il giorno gio 28 mag 2015 alle ore 16:00 Álvaro Alonso <
> aalonsog at dit.upm.es> ha scritto:
>
>> Hi Andrea,
>>
>> could you send me the request you are performing to '
>> http://cloud.lab.fi-ware.org:4730/v2.0/tokens'
>>
>> Thanks
>> --
>> Álvaro
>>
>> El 22 May 2015, a las 16:00, Andrea Orler <andrea.orler at gmail.com>
>> escribió:
>>
>> Hi!
>> Thank you for you quick answers.
>> I send you a pair of screenshots to better understand the situation.
>> I am developing my app with Django, a python framework.
>>
>> In "object_storage.py" you can find the script I use for authenticating
>> (which is similar to the one I found here
>> <https://forge.fiware.org/plugins/mediawiki/wiki/fiware/index.php/Object_Storage_-_User_and_Programmers_Guide>),
>> with
>> token_host = 'http://cloud.lab.fi-ware.org:4730/v2.0/tokens'
>>
>> In "runserver" I'm initializing the app running the code in
>> "object_storage.py", and I get the error you can see.
>>
>> If you need any other info, I'll be glad to give it to you.
>>
>> Thank you again, I'm very grateful!
>>
>> Andrea
>>
>> Il giorno ven 22 mag 2015 alle ore 14:50 Álvaro Alonso <
>> aalonsog at dit.upm.es> ha scritto:
>>
>>> Hi Andrea,
>>>
>>> I don’t fully understand your issue. Which request are you performing?
>>>
>>> BR
>>> --
>>> Álvaro
>>>
>>> El 22 May 2015, a las 13:14, Sándor Laki <laki.sandor at wigner.mta.hu>
>>> escribió:
>>>
>>> Dear Alvaro,
>>>
>>> Could you please have look at this issue? Andrea's username is
>>> andrea.orler at gmail.com
>>>
>>> Deatils:
>>> I can log in to the portal (cloud.lab.fiware.org), but I can not reach
>>> the object storage with my app through the APIs using the same user and psw.
>>> I can get the token, I can get the tenant, but when requesting for the
>>> "authentication json" to http://cloud.lab.fi-ware.org:4730/v2.0/tokens,
>>> I get a 401 unauthorized status.
>>>
>>> I experience this problem since right after migration.
>>>
>>> Best,
>>> Sandor
>>>
>>> 2015.05.22. 10:49 keltezéssel, Sándor Laki írta:
>>>
>>> I can get the token, I can get the tenant, but when requesting for the
>>> "authentication json" to http://cloud.lab.fi-ware.org:4730/v2.0/tokens,
>>> I get a 401 unauthorized status.
>>>
>>> Can you kindly tell me you something changed with the authentication or
>>> if I'm doing something wrong?
>>>
>>> Thank you very much,
>>> Andrea Orler
>>>
>>>
>>>
>>> --
>>> Sándor Laki
>>> EU FP7 FI-PPP XIFI project,
>>> Wigner Research Centre for Physics,
>>> Hungarian Academy of Sciences
>>> Konkoly Thege Miklós út 29-33.
>>> H-1121, Budapest, Hungary
>>> Cell: +36 70 374 2646
>>> Skype: sandor.laki
>>>
>>> XIFI: https://fi-xifi.eu/home.html
>>> FI-PPP: http://www.fi-ppp.eu/
>>>
>>>
>>> <runserver.png><object_storage.py.png>
>>
>>
>> <authentication.py>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.fiware.org/private/fiware-lab-help/attachments/20150529/eacab3c6/attachment.html>
-------------- next part --------------
First request to 'http://cloud.lab.fi-ware.org:4730/v2.0/tokens':
Headers: {
'date': 'Fri, 29 May 2015 13:50:39 GMT',
'vary': 'X-Auth-Token',
'content-length': '380',
'content-type': 'application/json',
'connection': 'close'
}
Body: {
"auth":
{
"passwordCredentials":
{
"username": "andrea.orler at gmail.com",
"password": "***"
}
}
}
Response: {
'access':
{
'token':
{
'issued_at': '2015-05-29T13:57:41.512907',
'expires': '2015-05-30T13:57:41Z',
'id': '54c84936f3eb42a79d5a90f2a7573795',
'audit_ids': ['0IlvluVtQCuooqhIozdhAg']
},
'serviceCatalog': [],
'user':
{
'username': 'andrea.orler at gmail.com',
'roles_links': [],
'id': 'andrea-3',
'roles': [],
'name': 'andrea.orler at gmail.com'
},
'metadata':
{
'is_admin': 0,
'roles': []
}
}
}
Second request to 'http://cloud.lab.fi-ware.org:4730/v2.0/tenants':
Headers: {
'date': 'Fri, 29 May 2015 14:07:44 GMT',
'vary': 'X-Auth-Token',
'content-length': '461',
'content-type': 'application/json',
'connection': 'close'
}
Body: {
}
Response: {
'tenants':
[
{
'enabled': True,
'description': 'This organization is intended to be used in the cloud environment. As long as you are a trial or community user this organization will be authorized as purchaser in the Cloud Application.',
'name': u'andrea-3 cloud',
'id': u'00000000000000000000000000004287'
},
{
'is_default': True,
'enabled': True,
'description': '',
'name': 'andrea.orler at gmail.com',
'id': '000000000000000000000000andrea-3'
}
],
'tenants_links': []
}
Third request to 'http://cloud.lab.fi-ware.org:4730/v2.0/tokens':
Headers: {
'content-length': '114',
'vary': 'X-Auth-Token',
'connection': 'close',
'date': 'Fri, 29 May 2015 14:13:15 GMT',
'content-type': 'application/json',
'www-authenticate': 'Keystone uri="http://cloud.lab.fi-ware.org:4730"'
}
Body: {
"auth":
{
"tenantName": "00000000000000000000000000004287",
"passwordCredentials":
{
"username": "andrea.orler at gmail.com",
"password": "***"
}
}
}
Response: {
'error':
{
'message': 'The request you have made requires authentication.',
'code': 401,
'title': 'Unauthorized'
}
}
You can get more information about our cookies and privacy policies clicking on the following links: Privacy policy Cookies policy