You can enable back-end JWT feature to send a JWT to back-end - [1]. This back-end JWT will have the application attributes.
If you have a requirement to send the custom application attributes in headers, then you can do it via a class mediator.
If you enable the back-end JWT feature, the generated JWT will be sent to back-end in X-JWT-Assertion header (by default).
You can follow the steps given below to set the application attributes in the header:
1. JWT header can be extracted in the class mediator.
For example,
((Axis2MessageContext) mc).getAxis2MessageContext().getProperty("TRANSPORT_HEADERS") returns the headers in the request. you can get the X-JWT-Assertion header
2. Decode the JWT
3. Set the relevant attributes as headers
4. Deploy the class mediator
5. Attach the mediation policy to the API