wso2 - How to pass basic auth header to SOAP endpoint from WS02 Api Manager? -
i using api manager 2.0, have designed new api , production url end point of web service. in api have added "message mediation policies" convert json soap in request , convert soap json in request. works fine when there no authentication.
when tried connect endpoint authenticated using basic unable send auth header. possible pass , if how achieve it?
i have tried endpoint security schema , no success that.
if configure endpoint security scheme
properly, should see authorization
property below, in api file, in repository/deployment/server/synapse-configs/default/api/
directory. double check if it's there.
<resource methods="get" url-mapping="/menu" faultsequence="fault"> <insequence> <property name="api.ut.backendrequesttime" expression="get-property('system_time')"/> <filter source="$ctx:am_key_type" regex="production"> <then> <property name="authorization" expression="fn:concat('basic ', 'ymhhdghpewe6cgfzc3dvcmq=')" scope="transport"/> <send> <endpoint name="admin--pizzashackapi_apiproductionendpoint_1"> <http uri-template="https://localhost:9443/am/sample/pizzashack/v1/api/"/> <property name="endpoint_address" value="https://localhost:9443/am/sample/pizzashack/v1/api/"/> </endpoint> </send> </then> <else> <property name="authorization" expression="fn:concat('basic ', 'ymhhdghpewe6cgfzc3dvcmq=')" scope="transport"/> <send> <endpoint name="admin--pizzashackapi_apisandboxendpoint_1"> <http uri-template="https://localhost:9443/am/sample/pizzashack/v1/api/"/> <property name="endpoint_address" value="https://localhost:9443/am/sample/pizzashack/v1/api/"/> </endpoint> </send> </else> </filter> </insequence> <outsequence> <class name="org.wso2.carbon.apimgt.usage.publisher.apimgtresponsehandler"/> <send/> </outsequence> </resource>
Comments
Post a Comment