Set Auth Headers in APIConnect

3.1k views Asked by At

I'm experimenting with APIConnect and would like to be able to invoke an OpenWhisk action. As far as I can tell, in order to do this I need to set the Authorization header with my token. The only options I can see under both the Invoke and Proxy policies is to use basic authentication.

Regardless of the OpenWhisk piece, in order for APIConnect to be a usable product for me I need to be able to set Headers.

1

There are 1 answers

2
Frederic Lavigne On BEST ANSWER

You can use a Set Variable policy in your API Connect flow and call message.headers.myheadername to set header values.

This article shows how: https://developer.ibm.com/apiconnect/2016/07/06/securing-apic-bm-app-httpheaders/

and the relevant documentation: http://www.ibm.com/support/knowledgecenter/SSFS6T/com.ibm.apic.toolkit.doc/rapim_cli_policies_setvariable.html