I’ve tried searching existing topics and the closest I found was: Basic Auth Example Using Mock Server which had no answers.
I’m trying to simulate the authentication on my postman mock servers by making the mock responses return 200 only when both
Authorization headers are passed.
I’ve enforced the
x-api-key header requirement simply by making the mock server private.
How would I configure my mock server to return a 401 example response if the
Authorization header is empty?
I have tried creating 2 example responses:
- Return status code 200 where I set
Authorizationheader as random values
- Return status code 401 where I hide
Unfortunately, creating the above two example requests did not satisfy that I am trying to achieve.