Page 2 of 2

Azure Relay Rest Service - Connect securely from Appery/OAuth or ?

Posted: Fri Oct 10, 2014 8:34 am
by Evgene Karachevtsev

Hello Dave,

I.e. you need to make such a request? This is possible, please see screenshots 1-3
Of course when testing in the browser you should enable Appery.io proxy for the service.
The only problem is that in response there will not json and not xml i.e. mapping and success of the event will not work. But complete event service will work.In it you can save the data in local storage
preif (jqXHR.status == 200) {
localStorage.setItem("token", jqXHR.responseText);
} else {
alert("error");
}/pre

Image
Image
Image


Azure Relay Rest Service - Connect securely from Appery/OAuth or ?

Posted: Fri Oct 10, 2014 1:03 pm
by Dave Shepherd

Hi Evgene

Thanks for this. I really appreciate your help !!!!
It worked perfectly - had to do a bit of work on the token itself before it was accepted as valid.

This led me to try the v2/OAuth2-13 method which does return the JSON response and I was able to map the token portion to a local storage variable.

Prefixing that with WRAP access token="localStorageVariable" in the Authorization parameter in the header of my request was all I needed to do.

Query Parameters changed from those above to:
grant_type : "client_credentials"
client_id : " Identity Name"
client_secret : " Identity Secret"
scope: " *** The scope or relying party***"

My app is working now as expected.

Have a great weekend.

Dave


Azure Relay Rest Service - Connect securely from Appery/OAuth or ?

Posted: Fri Oct 10, 2014 1:07 pm
by Evgene Karachevtsev

Dave,

Thank you for the update, glad it works!