Tuesday, October 20, 2015

Passing END_User_Name to as customized header to backend

Overview

This blog post describes how we can pass end user username to customized header.


Problem

I had a requirement for set end user name as user_id header to the backend.

<property name="USER-ID" expression="get-property(' END_USER_NAME')" scope="transport" type="STRING"/>

There was already header called END_USER_NAME set by after authentication. But problem is our extension handler running first(when we set ExtensionHandlerPosition top) and then authentication handler.
Because of that END_USER_NAME is null in custom insequence.

Passing END_User_Name

We need to add this to inSequence of the API through velocity template.

No comments :

Post a Comment