0 Replies Latest reply on Nov 19, 2013 8:57 PM by reggieh

    RESTful Web Services - How to acquire a token with Javascript for 3rd party?

    reggieh

      Hi,


      I read the Oracle documentation on securing a RESTful Service:



       

      http://www.oracle.com/technetwork/developer-tools/apex-listener/documentation/listener-dev-guide-1979546.html#securing_the_gallery_restful_services



      In the 3rd Party section, it talks about acquiring the token by accessing a URI with the browser:


      https://server:port/apex/resteasy/oauth2/auth?response_type=token&client_id=CLIENT_IDENTIFIER&state=STATE


      But it doesn't say how to acquire the token using JavaScript or any other way.  Because going through the browser then logging in isn't a real case scenario I would say.



      Also, even when I get a token by going through the browser, I still get an Unauthorized error when calling the Web Service.