1

I'd like to test an API that is protected by Hawk auth. After some reading tonight, I believe the best approach is to inject my custom Authorization header using a global karate.configure('headers', function () {...}) in my karate-config.js. I tried this and my function is invoked for every request but I don't seem to have any access to the request info necessary to create my custom auth header (e.g. hawk requires access to the request method, host, port, path, body, etc... to calculate a hash for the auth header). I believe I can handle the creation of the auth header if I can just get access to the request details.

Any advice on how to implement a custom auth scheme would be greatly appreciated.

jckdnk111
  • 2,280
  • 5
  • 33
  • 43
  • 1
    good timing ! it would be great if you can test 0.9.9.RC2 - please refer: https://github.com/intuit/karate/issues/1385 - and let us know your feedback in case we need to tweak anything else – Peter Thomas Dec 17 '20 at 04:23
  • This is great. Thank you so much! – jckdnk111 Dec 17 '20 at 04:41

0 Answers0