We use proprietary and third party´s cookies to improve your experience and our services, identifying your Internet Browsing preferences on our website; develop analytic activities and display advertising based on your preferences. If you keep browsing, you accept its use. You can get more information on our Cookie Policy
Cookies Policy
Ask Your Question
0

Single Sign On with WMarket, WStore and custom application

asked 2016-03-29 16:41:21 +0100

Eddy gravatar image

updated 2016-04-01 18:04:09 +0100

Hello all,

I am trying to consume calls to WStore and WMarket from an application that has obtained a user token from a Keyrock account. I would like to know how to setup such a scenario (I expect each application to have its own registration in Keyrock, so how do I make it so that each application trusts the bearer token of the other or how do I obtain multiple tokens pointing to the same principal?)

I tried working with from the answer by @amagan but I'm still not seeing the desired result. I have registered 2 applications on a Keyrock instance: 1 for WStore and 1 for an API protected using Spring security and an Angular directive to fetch the token client side.

From the Spring side everything seems to work, the problem starts when I try to access the WStore API with the same token. All I get is HTTP 401:

[01/Apr/2016 09:22:28] "GET /api/administration/profiles/idm_user?access_token=SkLZ02Ybzm2ehisfkaw2VLUTz93Ncn HTTP/1.1" 401 57

Suggestions are warmly welcome!

TIA, Edoardo

edit retag flag offensive close merge delete

Comments

This is not the way to proceed... Please, read the documentation published at: http://docs.fiwarestore.apiary.io/. As stated there, you have to include the header "Authorization" with the value "Bearer ACCESS_TOKEN" (replacing ACCESS_TOKEN by the token) to complete the request.

amagan gravatar imageamagan ( 2016-04-04 11:17:51 +0100 )edit

And on the other hand Keyrock demands request parameter based tokens, failing otherwise. I am having great difficulty setting up the Spring client in 1 coherent way; is it possible to configure either one to conform to the other?

Eddy gravatar imageEddy ( 2016-04-04 11:34:07 +0100 )edit

Bear in mind that WStore and KeyRock are two separate components. KeyRock is the service providing OAuth2 while WStore is just an application that makes use of KeyRock to authenticate users... I am afraid but there is no way to configure so one can conform the other :(

amagan gravatar imageamagan ( 2016-04-04 16:07:23 +0100 )edit

1 answer

Sort by » oldest newest most voted
0

answered 2016-03-30 10:02:14 +0100

amagan gravatar image

WStore and WMarket accept any valid OAuth2 token (even if they belong to another application).

edit flag offensive delete link more

Comments

Hello, thank you for your reply, I hadn't replied yet because I didn't have time to try my use-case within the context of your reply. Today I checked and I am getting HTTP 401 when I try to access a WStore API endpoint with a token from another application.

Eddy gravatar imageEddy ( 2016-04-01 17:50:06 +0100 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2016-03-29 16:41:21 +0100

Seen: 5,170 times

Last updated: Apr 01 '16