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.