Single Sign On with WMarket, WStore and custom application
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
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.
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?
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 :(