Hi,
We have some issues/questions:
1.- We have successfully made an Oauth2 token request against http://account.lab.fiware.org/ using PHP, but we’ve had to add an extra “Authentication: Basic clientId:clientSecret" header to obtain the bearer token. This breaks any Oauth2-compatible clients (e.g. Postman, a request-debugging GUI that supports oauth2 flows breaks due to this).
2.- Once we get this token, we try to access our WSTORE URL (http://130.206.118.239/api/offering/offerings) resource. We’ve tried all RFC6750 methods with no result:
3.- If we try to use the WSTORE oauth2 endpoint directly (http://130.206.118.239/oauth2/auth), we obtain a Python stack trace with an “Invalid Application” (e.g. http://130.206.118.239/oauth2/auth?client_id=df19697e2b434130a4b3bd12eefbaecb&scope=&state=1757263&redirect_uri=https://www.getpostman.com/oauth2/callback&response_type=code)
DoesNotExist at /oauth2/auth
Application matching query does not exist.
Request Method: GET
Request URL: http://130.206.118.239/oauth2/auth?client_id=df19697e2b434130a4b3bd12eefbaecb&scope=&state=1757263&redirect_uri=https://www.getpostman.com/oauth2/callback&response_type=code
Django Version: 1.4.13
Exception Type: DoesNotExist
Exception Value:
Application matching query does not exist.
Exception Location: /opt/wstore/src/virtenv/lib/python2.7/site-packages/django/db/models/query.py in get, line 366
Python Executable: /usr/bin/python
Python Version: 2.7.6
Python Path:
['/opt/wstore/src/virtenv/lib/python2.7/site-packages',
'/opt/wstore/src',
'/usr/lib/python2.7',
'/usr/lib/python2.7/plat-x86_64-linux-gnu',
'/usr/lib/python2.7/lib-tk',
'/usr/lib/python2.7/lib-old',
'/usr/lib/python2.7/lib-dynload',
'/usr/local/lib/python2.7/dist-packages',
'/usr/lib/python2.7/dist-packages']
Server time: Tue, 6 Oct 2015 07:24:55 -05
So the questions:
- Should we obtain the token from the FIWARE General Enabler endpoint or from the WSTORE endpoint itself?
- If it’s the first, how shall we provide the access_token to WSTORE to access the resources API?
- If it’s the second, is there any extra configuration to be done?
–
Ramon Poca - ramon@ptchwrks.com
CONDUCTR by PTCHWRKS
Made with ♥ in Barcelona
-------------------------
Information in this email including any attachments may be privileged, confidential and is intended exclusively for the addressee. The views expressed may not be official policy, but the personal views of the originator. If you have received it in error, please notify the sender by return email and delete it from your system. You should not reproduce, distribute, store, retransmit, use or disclose its contents to anyone. Please note we reserve the right to monitor all email communication through our internal and external networks. Conductr and the Conductr logo are trade marks of PATCHWORKS makes tendertech S.L. registered in the EU, Spain and other countries.
Activat 6 d’octubre de 2015 a 13:52:15, Monica Rikic (monica@ptchwrks.com) escrit:
Hello,
I add Ramon to the thread, he has some questions about the WStore API and oauth2.
Cheers,
Mónica
On 22/9/15 9:06, Álvaro Alonso wrote:
Hi Monica,
perhaps you can take a look yo our node.js example that is completely tested with FIWARE Lab.
https://github.com/ging/oauth2-example-client
Anyway if you have doubts regarding specific issues in WStore you have to contact WStore team:
http://catalogue.fiware.org/enablers/store-wstore
BR
--
Álvaro
El 21 Sep 2015, a las 18:45, Monica Rikic <monica@ptchwrks.com> escribió:
Hello Álvaro,
As I said in my previous messages, I'm trying in my localhost the example that was given for php oauth2: https://github.com/cchristodoulopoulos/fiware-oauth2-client-example-php
I've attached in this email the files I'm trying in my localhost. I don't get any error, I just don't get the access token after authorizing, so I cannot access the information I need from the WStore. I'm just trying to get the access token in order to retrieve the information from the WStore API and display it in another website.
I understand you are not a PHP expert. So, how would you access the JSON information from http://130.206.118.239/api/offering/offerings
in order to display the output in a website? what system would you use other than PHP? Any solution would work for us but we can't get it working with PHP at least.
Thanks,
Mónica
On 21/9/15 16:58, Álvaro Alonso wrote:
Hi Monica,
sorry but I’m not an expert in php so if you don’t send me the http requests and response I cannot help you….
BR
--
Álvaro
El 16 Sep 2015, a las 17:12, Monica Rikic <monica@ptchwrks.com> escribió:
Hello,
I'm following the php example linked in the previous email.
I can authorize the app but I don't get the access token back. I don't get any logs, I just don't get the token.
Maybe the example is not the correct to follow...
We just need to be able to acces the JSON from our store here:
http://130.206.118.239/
This one: http://130.206.118.239/api/offering/offerings/
Remotely so we can use the data in our website.
If you can point me to another way of achieving what we need, anything would help.
Thanks,
Mónica
On 16/9/15 15:07, Help-Desk wrote:
Hi Monica,
could explain me with more detail which requests are you sending are what response do you obtain from the idm?
BR
<Archivo adjunto al mensaje.png> FW External User created an issue
Help-Desk / HELP-4189
[Fiware-tech-help] problem ouath2
Issue Type: extRequest
Assignee: Alvaro Alonso
Components: FIWARE-TECH-HELP
Created: 16/Sep/15 8:17 AM
Priority: Major
Reporter: FW External User
Status: Open
Hi,
We're trying to access the WStore api we have installed under our fiware
account of julia@ptchwrks.com <julia@ptchwrks.com> via oauth2 and
we're experimenting some trouble in the process.
We're able to authorize the app but we never get the access token back.
We're following this example:
https://github.com/cchristodoulopoulos/fiware-oauth2-client-example-php
We've also tried others in the php libraries in http://oauth.net/2/
Following the indications of:
https://github.com/ging/fi-ware-idm/blob/master/doc/oauth2.md
But we never receive the access token back.
Do you know where the problem might be?
Thanks,
Mónica
Hello,
I'm following the php example linked in the previous email.
I can authorize the app but I don't get the access token back. I don't
get any logs, I just don't get the token.
Maybe the example is not the correct to follow...
We just need to be able to acces the JSON from our store here:
http://130.206.118.239/
This one: http://130.206.118.239/api/offering/offerings/
Remotely so we can use the data in our website.
If you can point me to another way of achieving what we need, anything
would help.
Thanks,
Mónica