79769730

Date: 2025-09-19 16:17:15
Score: 1
Natty:
Report link

I managed to figure it out myself.

In the API Manager, add a new Policy for HTTP Request and upload the following file in the policy:

<sequence xmlns="http://ws.apache.org/ns/synapse" name="TokenExchange">
    <property name="Originator" expression="$ctx:api.ut.userName" scope="transport"/>
</sequence>

Then you will get the Originator field of the header with the basic auth username.

Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Atanas Matev