How to pass Authorization Header WSO2 (API Manager) to my backend service?
Asked Answered
I

2

5

I need to pass Authorization Header from API Manager (WSO2) to my Service Bus Aplication (Oracle).

I saw in another post that I cant do that, because API will validate the token against the key manager and drop that token before calling the back end. (How to pass authorization header in WSO2 OAuth2 and its backend API server Oauth2?)

There's any alternative to pass the token from API Manager to my service bus application?

There's some additional settings for that?

Iceblink answered 24/3, 2016 at 13:8 Comment(0)
O
10

In conf/api-manager.xml, change value of "RemoveOAuthHeadersFromOutMessage" to false. Authorization header will not be removed and you can access it in your sequence, then you can set it to the request header to you backend. Not sure whether this is what you want or not.

Oconnor answered 25/3, 2016 at 12:2 Comment(3)
Is it possible to set up RemoveOAuthHeadersFromOutMessage to false to my APIM Cloud Account ?Iceblink
@Iceblink Sorry I have never used the cloud account.Oconnor
@Oconnor when I change the value to "false" and restart the api manager، Its value automatically becomes "true" !!!Candelariacandelario
S
0

One option would be to send same oauth token in another custom header and then by adding a custom mediation sequence in the api manager, set that custom header to Authorization header and then send it to backend server.

https://docs.wso2.com/display/AM1100/Pass+a+Custom+Authorization+Token+to+the+Backend.

Swedenborgianism answered 25/3, 2016 at 3:28 Comment(1)
Is it possible to set up RemoveOAuthHeadersFromOutMessage to false to my APIM Cloud Account ?Iceblink

© 2022 - 2024 — McMap. All rights reserved.