Two Authorizations in Header ***Urgent***

pxzxz1
New Member

Hello All

I have problem with Authorization in the Header. I am using OAuth2 (Authorization: Bearer XXXXX) to the proxy and already have an existing Basic Auth (Authorization: Basic XXXXX) to the target server.

How can I parse two Authorizations in Apigee and run on Postman to view?

Solved Solved
0 1 173
1 ACCEPTED SOLUTION

It sounds like what you want to do is use the AssignMessage Policy (https://docs.apigee.com/api-platform/reference/policies/assign-message-policy#use-cases) to remove the OAuth Authorization header, and then either another AssignMessage or BasicAuthentication (https://docs.apigee.com/api-platform/reference/policies/basic-authentication-policy) to add the target server's Basic Auth token.

The target server won't see the OAuth token that way, but I'm assuming that's expected/desired behavior.

View solution in original post

1 REPLY 1

It sounds like what you want to do is use the AssignMessage Policy (https://docs.apigee.com/api-platform/reference/policies/assign-message-policy#use-cases) to remove the OAuth Authorization header, and then either another AssignMessage or BasicAuthentication (https://docs.apigee.com/api-platform/reference/policies/basic-authentication-policy) to add the target server's Basic Auth token.

The target server won't see the OAuth token that way, but I'm assuming that's expected/desired behavior.