1

I am using apimanger 1.9.

I read this already : Add header with username into request to backend in wso2 apimanager.

I am able to add and forward username to backend in wso2 apimanager for specific service; but I want this for all service. I am modifying admin--<api_name>_<version>.xml for all services(50 services), which is very much manual. Something it leads to manual error.

Is there a single place configuration where I can set this (forward username to backend endpoint) for all service?

One more question - if I create and publish the APIs using "Publisher API" feature, is there a way to post something to set up the add header for each API?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Moon Mysterious
  • 164
  • 1
  • 14

1 Answers1

1

Modify the velocity_template.xml which decides the template of an API. Please read my answer given to a similar requirement. You need to modify the relevant section in the velocity_template.xml.

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
  • Understood the concept. I will and let you know. Thanks a lot. – Moon Mysterious Jul 27 '15 at 11:05
  • 1
    Thanks a lot. I am able to do this using custome handler and velocity_template.xml. One thing I want to share. Please don't remove authentication handler as it is setting END_USER_NAME. So if anyone wish to pass username please use authentication handler first and then custom handler. – Moon Mysterious Jul 29 '15 at 10:15