Service Virtualization

  • 1.  OAuth 2.0 authorization support for REST step or services

    Posted Nov 09, 2016 05:41 AM

    Dear Community Dwellers,

     

    As part of new authorization mechanism, development team has introduced OAuth 2.0 authorization for REST API calls similar to what SOAPUI has.

     

    Is it possible to achieve the same with DevTest REST step too? We currenlty have Basic authroization with DevTest and want to find a solution for OAuth2.0 with DevTest.

     

    Is there any workaround?

     

    Thanks,

    Ankush



  • 2.  Re: OAuth 2.0 authorization support for REST step or services
    Best Answer

    Posted Nov 11, 2016 12:25 PM

    Hi All,

     

    Have found a workaround. Steps to follow are:

     

    1) We need 2 REST steps:

          a) First REST calls will get the access token using the Outh2.0 REST call and username and password and also the parameter as grant_type = client_credentials.

         b) Access Token received in the first call can be saved in a property to be used in the actual REST call that service has to make.

     

    For more information, please visit this link, this article only gave the idea of following the above steps:

    https://stormpath.com/blog/build-api-restify-stormpath 

     

    Attaching the screen shot of the REST STEP for ACCESS TOKEN.How to user a parameter in access token rest call