Search code examples
restpostmanhp-uft

two level authentication test


the app we have has two levels of authentication. First it authorizes user with a Basic token. This authentication generates bearer token (session specific). The user can use this bearer token to various transactions in the app.

Flows:

  1. user authentication at auth.xxxx.com with Basic token
  2. user then redirected to api.xxx.com to do various transactions - uses bearer token generated from 1

I am not understanding how I could use basic / bearer session token any tools available, I have tried it in PostMan and HP's UFT.

The situation aptly described here from a developer standpoint: How to implement two level authentication in a RESTful API?


Solution

  • I had to capture the passKey using Json Extractor and then use RegEx extractor to get bearer token. NO programming was required