forked from community/product-iots
Merge pull request #109 from ayyoob/master
Added JWT grant type and upgraded the APIM versionapplication-manager-new
commit
155867b334
@ -0,0 +1,119 @@
|
||||
<wsp:Policy xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
|
||||
xmlns:throttle="http://www.wso2.org/products/wso2commons/throttle">
|
||||
<throttle:MediatorThrottleAssertion>
|
||||
<wsp:Policy>
|
||||
<!--It's possible to define a display name for a tier to show in UIs by adding the attribute of throttle:displayName="xxxx" for <throttle:ID>
|
||||
element.
|
||||
For ex: <throttle:ID throttle:type="ROLE" throttle:displayName="xxxx">Gold</throttle:ID>
|
||||
......
|
||||
-->
|
||||
<throttle:ID throttle:type="ROLE">Large</throttle:ID>
|
||||
<wsp:Policy>
|
||||
<throttle:Control>
|
||||
<wsp:Policy>
|
||||
<throttle:MaximumCount>20</throttle:MaximumCount>
|
||||
<throttle:UnitTime>60000</throttle:UnitTime>
|
||||
<!--It's possible to define tier level attributes as below for each tier level.For eg:Payment Plan for a tier
|
||||
<wsp:Policy>
|
||||
<throttle:Attributes>
|
||||
<throttle:Attribute1>xxxx</throttle:Attribute1>
|
||||
<throttle:Attribute2>xxxx</throttle:Attribute2>
|
||||
</throttle:Attributes>
|
||||
</wsp:Policy>
|
||||
-->
|
||||
<wsp:Policy>
|
||||
<throttle:Attributes>
|
||||
<throttle:x-wso2-BillingPlan>FREE</throttle:x-wso2-BillingPlan>
|
||||
<throttle:x-wso2-StopOnQuotaReach>true</throttle:x-wso2-StopOnQuotaReach>
|
||||
</throttle:Attributes>
|
||||
</wsp:Policy>
|
||||
</wsp:Policy>
|
||||
</throttle:Control>
|
||||
</wsp:Policy>
|
||||
</wsp:Policy>
|
||||
<wsp:Policy>
|
||||
<!--It's possible to define a display name for a tier to show in UIs by adding the attribute of throttle:displayName="xxxx" for <throttle:ID>
|
||||
element.
|
||||
For ex: <throttle:ID throttle:type="ROLE" throttle:displayName="xxxx">Gold</throttle:ID>
|
||||
......
|
||||
-->
|
||||
<throttle:ID throttle:type="ROLE">Medium</throttle:ID>
|
||||
<wsp:Policy>
|
||||
<throttle:Control>
|
||||
<wsp:Policy>
|
||||
<throttle:MaximumCount>5</throttle:MaximumCount>
|
||||
<throttle:UnitTime>60000</throttle:UnitTime>
|
||||
<!--It's possible to define tier level attributes as below for each tier level.For eg:Payment Plan for a tier
|
||||
<wsp:Policy>
|
||||
<throttle:Attributes>
|
||||
<throttle:Attribute1>xxxx</throttle:Attribute1>
|
||||
<throttle:Attribute2>xxxx</throttle:Attribute2>
|
||||
</throttle:Attributes>
|
||||
</wsp:Policy>
|
||||
-->
|
||||
<wsp:Policy>
|
||||
<throttle:Attributes>
|
||||
<throttle:x-wso2-BillingPlan>FREE</throttle:x-wso2-BillingPlan>
|
||||
<throttle:x-wso2-StopOnQuotaReach>true</throttle:x-wso2-StopOnQuotaReach>
|
||||
</throttle:Attributes>
|
||||
</wsp:Policy>
|
||||
</wsp:Policy>
|
||||
</throttle:Control>
|
||||
</wsp:Policy>
|
||||
</wsp:Policy>
|
||||
<wsp:Policy>
|
||||
<!--It's possible to define a display name for a tier to show in UIs by adding the attribute of throttle:displayName="xxxx" for <throttle:ID>
|
||||
element.
|
||||
For ex: <throttle:ID throttle:type="ROLE" throttle:displayName="xxxx">Gold</throttle:ID>
|
||||
......
|
||||
-->
|
||||
<throttle:ID throttle:type="ROLE">Small</throttle:ID>
|
||||
<wsp:Policy>
|
||||
<throttle:Control>
|
||||
<wsp:Policy>
|
||||
<throttle:MaximumCount>1</throttle:MaximumCount>
|
||||
<throttle:UnitTime>60000</throttle:UnitTime>
|
||||
<!--It's possible to define tier level attributes as below for each tier level.For eg:Payment Plan for a tier
|
||||
<wsp:Policy>
|
||||
<throttle:Attributes>
|
||||
<throttle:Attribute1>xxxx</throttle:Attribute1>
|
||||
<throttle:Attribute2>xxxx</throttle:Attribute2>
|
||||
</throttle:Attributes>
|
||||
</wsp:Policy>
|
||||
-->
|
||||
<wsp:Policy>
|
||||
<throttle:Attributes>
|
||||
<throttle:x-wso2-BillingPlan>FREE</throttle:x-wso2-BillingPlan>
|
||||
<throttle:x-wso2-StopOnQuotaReach>true</throttle:x-wso2-StopOnQuotaReach>
|
||||
</throttle:Attributes>
|
||||
</wsp:Policy>
|
||||
</wsp:Policy>
|
||||
</throttle:Control>
|
||||
</wsp:Policy>
|
||||
</wsp:Policy>
|
||||
<wsp:Policy>
|
||||
<!--It's possible to define a display name for a tier to show in UIs by adding the attribute of throttle:displayName="xxxx" for <throttle:ID>
|
||||
element.
|
||||
For ex: <throttle:ID throttle:type="ROLE" throttle:displayName="xxxx">Gold</throttle:ID>
|
||||
......
|
||||
-->
|
||||
<throttle:ID throttle:type="ROLE">Unauthenticated</throttle:ID>
|
||||
<wsp:Policy>
|
||||
<throttle:Control>
|
||||
<wsp:Policy>
|
||||
<throttle:MaximumCount>60</throttle:MaximumCount>
|
||||
<throttle:UnitTime>60000</throttle:UnitTime>
|
||||
<!--It's possible to define tier level attributes as below for each tier level.For eg:Payment Plan for a tier
|
||||
<wsp:Policy>
|
||||
<throttle:Attributes>
|
||||
<throttle:Attribute1>xxxx</throttle:Attribute1>
|
||||
<throttle:Attribute2>xxxx</throttle:Attribute2>
|
||||
</throttle:Attributes>
|
||||
</wsp:Policy>
|
||||
-->
|
||||
</wsp:Policy>
|
||||
</throttle:Control>
|
||||
</wsp:Policy>
|
||||
</wsp:Policy>
|
||||
</throttle:MediatorThrottleAssertion>
|
||||
</wsp:Policy>
|
@ -0,0 +1,119 @@
|
||||
<wsp:Policy xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
|
||||
xmlns:throttle="http://www.wso2.org/products/wso2commons/throttle">
|
||||
<throttle:MediatorThrottleAssertion>
|
||||
<wsp:Policy>
|
||||
<!--It's possible to define a display name for a tier to show in UIs by adding the attribute of throttle:displayName="xxxx" for <throttle:ID>
|
||||
element.
|
||||
For ex: <throttle:ID throttle:type="ROLE" throttle:displayName="xxxx">Gold</throttle:ID>
|
||||
......
|
||||
-->
|
||||
<throttle:ID throttle:type="ROLE">Ultimate</throttle:ID>
|
||||
<wsp:Policy>
|
||||
<throttle:Control>
|
||||
<wsp:Policy>
|
||||
<throttle:MaximumCount>20</throttle:MaximumCount>
|
||||
<throttle:UnitTime>60000</throttle:UnitTime>
|
||||
<!--It's possible to define tier level attributes as below for each tier level.For eg:Payment Plan for a tier
|
||||
<wsp:Policy>
|
||||
<throttle:Attributes>
|
||||
<throttle:Attribute1>xxxx</throttle:Attribute1>
|
||||
<throttle:Attribute2>xxxx</throttle:Attribute2>
|
||||
</throttle:Attributes>
|
||||
</wsp:Policy>
|
||||
-->
|
||||
<wsp:Policy>
|
||||
<throttle:Attributes>
|
||||
<throttle:x-wso2-BillingPlan>FREE</throttle:x-wso2-BillingPlan>
|
||||
<throttle:x-wso2-StopOnQuotaReach>true</throttle:x-wso2-StopOnQuotaReach>
|
||||
</throttle:Attributes>
|
||||
</wsp:Policy>
|
||||
</wsp:Policy>
|
||||
</throttle:Control>
|
||||
</wsp:Policy>
|
||||
</wsp:Policy>
|
||||
<wsp:Policy>
|
||||
<!--It's possible to define a display name for a tier to show in UIs by adding the attribute of throttle:displayName="xxxx" for <throttle:ID>
|
||||
element.
|
||||
For ex: <throttle:ID throttle:type="ROLE" throttle:displayName="xxxx">Gold</throttle:ID>
|
||||
......
|
||||
-->
|
||||
<throttle:ID throttle:type="ROLE">Plus</throttle:ID>
|
||||
<wsp:Policy>
|
||||
<throttle:Control>
|
||||
<wsp:Policy>
|
||||
<throttle:MaximumCount>5</throttle:MaximumCount>
|
||||
<throttle:UnitTime>60000</throttle:UnitTime>
|
||||
<!--It's possible to define tier level attributes as below for each tier level.For eg:Payment Plan for a tier
|
||||
<wsp:Policy>
|
||||
<throttle:Attributes>
|
||||
<throttle:Attribute1>xxxx</throttle:Attribute1>
|
||||
<throttle:Attribute2>xxxx</throttle:Attribute2>
|
||||
</throttle:Attributes>
|
||||
</wsp:Policy>
|
||||
-->
|
||||
<wsp:Policy>
|
||||
<throttle:Attributes>
|
||||
<throttle:x-wso2-BillingPlan>FREE</throttle:x-wso2-BillingPlan>
|
||||
<throttle:x-wso2-StopOnQuotaReach>true</throttle:x-wso2-StopOnQuotaReach>
|
||||
</throttle:Attributes>
|
||||
</wsp:Policy>
|
||||
</wsp:Policy>
|
||||
</throttle:Control>
|
||||
</wsp:Policy>
|
||||
</wsp:Policy>
|
||||
<wsp:Policy>
|
||||
<!--It's possible to define a display name for a tier to show in UIs by adding the attribute of throttle:displayName="xxxx" for <throttle:ID>
|
||||
element.
|
||||
For ex: <throttle:ID throttle:type="ROLE" throttle:displayName="xxxx">Gold</throttle:ID>
|
||||
......
|
||||
-->
|
||||
<throttle:ID throttle:type="ROLE">Basic</throttle:ID>
|
||||
<wsp:Policy>
|
||||
<throttle:Control>
|
||||
<wsp:Policy>
|
||||
<throttle:MaximumCount>1</throttle:MaximumCount>
|
||||
<throttle:UnitTime>60000</throttle:UnitTime>
|
||||
<!--It's possible to define tier level attributes as below for each tier level.For eg:Payment Plan for a tier
|
||||
<wsp:Policy>
|
||||
<throttle:Attributes>
|
||||
<throttle:Attribute1>xxxx</throttle:Attribute1>
|
||||
<throttle:Attribute2>xxxx</throttle:Attribute2>
|
||||
</throttle:Attributes>
|
||||
</wsp:Policy>
|
||||
-->
|
||||
<wsp:Policy>
|
||||
<throttle:Attributes>
|
||||
<throttle:x-wso2-BillingPlan>FREE</throttle:x-wso2-BillingPlan>
|
||||
<throttle:x-wso2-StopOnQuotaReach>true</throttle:x-wso2-StopOnQuotaReach>
|
||||
</throttle:Attributes>
|
||||
</wsp:Policy>
|
||||
</wsp:Policy>
|
||||
</throttle:Control>
|
||||
</wsp:Policy>
|
||||
</wsp:Policy>
|
||||
<wsp:Policy>
|
||||
<!--It's possible to define a display name for a tier to show in UIs by adding the attribute of throttle:displayName="xxxx" for <throttle:ID>
|
||||
element.
|
||||
For ex: <throttle:ID throttle:type="ROLE" throttle:displayName="xxxx">Gold</throttle:ID>
|
||||
......
|
||||
-->
|
||||
<throttle:ID throttle:type="ROLE">Unauthenticated</throttle:ID>
|
||||
<wsp:Policy>
|
||||
<throttle:Control>
|
||||
<wsp:Policy>
|
||||
<throttle:MaximumCount>60</throttle:MaximumCount>
|
||||
<throttle:UnitTime>60000</throttle:UnitTime>
|
||||
<!--It's possible to define tier level attributes as below for each tier level.For eg:Payment Plan for a tier
|
||||
<wsp:Policy>
|
||||
<throttle:Attributes>
|
||||
<throttle:Attribute1>xxxx</throttle:Attribute1>
|
||||
<throttle:Attribute2>xxxx</throttle:Attribute2>
|
||||
</throttle:Attributes>
|
||||
</wsp:Policy>
|
||||
-->
|
||||
</wsp:Policy>
|
||||
</throttle:Control>
|
||||
</wsp:Policy>
|
||||
</wsp:Policy>
|
||||
</throttle:MediatorThrottleAssertion>
|
||||
</wsp:Policy>
|
@ -0,0 +1,122 @@
|
||||
<wsp:Policy xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
|
||||
xmlns:throttle="http://www.wso2.org/products/wso2commons/throttle">
|
||||
<throttle:MediatorThrottleAssertion>
|
||||
<wsp:Policy>
|
||||
<!--It's possible to define a display name for a tier to show in UIs by adding the attribute of throttle:displayName="xxxx" for <throttle:ID>
|
||||
element.
|
||||
For ex: <throttle:ID throttle:type="ROLE" throttle:displayName="xxxx">Gold</throttle:ID>
|
||||
......
|
||||
-->
|
||||
<throttle:ID throttle:type="ROLE">Gold</throttle:ID>
|
||||
<wsp:Policy>
|
||||
<throttle:Control>
|
||||
<wsp:Policy>
|
||||
<throttle:MaximumCount>20</throttle:MaximumCount>
|
||||
<throttle:UnitTime>60000</throttle:UnitTime>
|
||||
<!--It's possible to define tier level attributes as below for each tier level.For eg:Payment Plan for a tier
|
||||
<wsp:Policy>
|
||||
<throttle:Attributes>
|
||||
<throttle:Attribute1>xxxx</throttle:Attribute1>
|
||||
<throttle:Attribute2>xxxx</throttle:Attribute2>
|
||||
</throttle:Attributes>
|
||||
</wsp:Policy>
|
||||
-->
|
||||
<wsp:Policy>
|
||||
<throttle:Attributes>
|
||||
<throttle:x-wso2-BillingPlan>FREE</throttle:x-wso2-BillingPlan>
|
||||
<throttle:x-wso2-StopOnQuotaReach>true</throttle:x-wso2-StopOnQuotaReach>
|
||||
</throttle:Attributes>
|
||||
</wsp:Policy>
|
||||
|
||||
</wsp:Policy>
|
||||
</throttle:Control>
|
||||
</wsp:Policy>
|
||||
</wsp:Policy>
|
||||
<wsp:Policy>
|
||||
<!--It's possible to define a display name for a tier to show in UIs by adding the attribute of throttle:displayName="xxxx" for <throttle:ID>
|
||||
element.
|
||||
For ex: <throttle:ID throttle:type="ROLE" throttle:displayName="xxxx">Gold</throttle:ID>
|
||||
......
|
||||
-->
|
||||
<throttle:ID throttle:type="ROLE">Silver</throttle:ID>
|
||||
<wsp:Policy>
|
||||
<throttle:Control>
|
||||
<wsp:Policy>
|
||||
<throttle:MaximumCount>5</throttle:MaximumCount>
|
||||
<throttle:UnitTime>60000</throttle:UnitTime>
|
||||
<!--It's possible to define tier level attributes as below for each tier level.For eg:Payment Plan for a tier
|
||||
<wsp:Policy>
|
||||
<throttle:Attributes>
|
||||
<throttle:Attribute1>xxxx</throttle:Attribute1>
|
||||
<throttle:Attribute2>xxxx</throttle:Attribute2>
|
||||
</throttle:Attributes>
|
||||
</wsp:Policy>
|
||||
-->
|
||||
<wsp:Policy>
|
||||
<throttle:Attributes>
|
||||
<throttle:x-wso2-BillingPlan>FREE</throttle:x-wso2-BillingPlan>
|
||||
<throttle:x-wso2-StopOnQuotaReach>true</throttle:x-wso2-StopOnQuotaReach>
|
||||
</throttle:Attributes>
|
||||
</wsp:Policy>
|
||||
|
||||
</wsp:Policy>
|
||||
</throttle:Control>
|
||||
</wsp:Policy>
|
||||
</wsp:Policy>
|
||||
<wsp:Policy>
|
||||
<!--It's possible to define a display name for a tier to show in UIs by adding the attribute of throttle:displayName="xxxx" for <throttle:ID>
|
||||
element.
|
||||
For ex: <throttle:ID throttle:type="ROLE" throttle:displayName="xxxx">Gold</throttle:ID>
|
||||
......
|
||||
-->
|
||||
<throttle:ID throttle:type="ROLE">Bronze</throttle:ID>
|
||||
<wsp:Policy>
|
||||
<throttle:Control>
|
||||
<wsp:Policy>
|
||||
<throttle:MaximumCount>1</throttle:MaximumCount>
|
||||
<throttle:UnitTime>60000</throttle:UnitTime>
|
||||
<!--It's possible to define tier level attributes as below for each tier level.For eg:Payment Plan for a tier
|
||||
<wsp:Policy>
|
||||
<throttle:Attributes>
|
||||
<throttle:Attribute1>xxxx</throttle:Attribute1>
|
||||
<throttle:Attribute2>xxxx</throttle:Attribute2>
|
||||
</throttle:Attributes>
|
||||
</wsp:Policy>
|
||||
-->
|
||||
<wsp:Policy>
|
||||
<throttle:Attributes>
|
||||
<throttle:x-wso2-BillingPlan>FREE</throttle:x-wso2-BillingPlan>
|
||||
<throttle:x-wso2-StopOnQuotaReach>true</throttle:x-wso2-StopOnQuotaReach>
|
||||
</throttle:Attributes>
|
||||
</wsp:Policy>
|
||||
|
||||
</wsp:Policy>
|
||||
</throttle:Control>
|
||||
</wsp:Policy>
|
||||
</wsp:Policy>
|
||||
<wsp:Policy>
|
||||
<!--It's possible to define a display name for a tier to show in UIs by adding the attribute of throttle:displayName="xxxx" for <throttle:ID>
|
||||
element.
|
||||
For ex: <throttle:ID throttle:type="ROLE" throttle:displayName="xxxx">Gold</throttle:ID>
|
||||
......
|
||||
-->
|
||||
<throttle:ID throttle:type="ROLE">Unauthenticated</throttle:ID>
|
||||
<wsp:Policy>
|
||||
<throttle:Control>
|
||||
<wsp:Policy>
|
||||
<throttle:MaximumCount>60</throttle:MaximumCount>
|
||||
<throttle:UnitTime>60000</throttle:UnitTime>
|
||||
<!--It's possible to define tier level attributes as below for each tier level.For eg:Payment Plan for a tier
|
||||
<wsp:Policy>
|
||||
<throttle:Attributes>
|
||||
<throttle:Attribute1>xxxx</throttle:Attribute1>
|
||||
<throttle:Attribute2>xxxx</throttle:Attribute2>
|
||||
</throttle:Attributes>
|
||||
</wsp:Policy>
|
||||
-->
|
||||
</wsp:Policy>
|
||||
</throttle:Control>
|
||||
</wsp:Policy>
|
||||
</wsp:Policy>
|
||||
</throttle:MediatorThrottleAssertion>
|
||||
</wsp:Policy>
|
@ -0,0 +1,24 @@
|
||||
<api xmlns="http://ws.apache.org/ns/synapse" name="_WSO2AMAuthorizeAPI_" context="/authorize">
|
||||
<resource methods="GET" url-mapping="/*" faultSequence="_token_fault_">
|
||||
<inSequence>
|
||||
<property name="uri.var.portnum" expression="get-property('keyManager.port')"/>
|
||||
<property name="uri.var.hostname" expression="get-property('keyManager.hostname')"/>
|
||||
<send>
|
||||
<endpoint>
|
||||
<http uri-template="https://{uri.var.hostname}:{uri.var.portnum}/oauth2/authorize">
|
||||
<timeout>
|
||||
<duration>60000</duration>
|
||||
<responseAction>fault</responseAction>
|
||||
</timeout>
|
||||
</http>
|
||||
</endpoint>
|
||||
</send>
|
||||
</inSequence>
|
||||
<outSequence>
|
||||
<send/>
|
||||
</outSequence>
|
||||
</resource>
|
||||
<handlers>
|
||||
<handler class="org.wso2.carbon.apimgt.gateway.handlers.common.SynapsePropertiesHandler"/>
|
||||
</handlers>
|
||||
</api>
|
@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?><api xmlns="http://ws.apache.org/ns/synapse" name="_WSO2AMRevokeAPI_" context="/revoke">
|
||||
<resource methods="POST" url-mapping="/*" faultSequence="_token_fault_">
|
||||
<inSequence>
|
||||
<property name="uri.var.portnum" expression="get-property('keyManager.port')"/>
|
||||
<property name="uri.var.hostname" expression="get-property('keyManager.hostname')"/>
|
||||
<send>
|
||||
<endpoint>
|
||||
<http uri-template="https://{uri.var.hostname}:{uri.var.portnum}/oauth2/revoke">
|
||||
<timeout>
|
||||
<duration>60000</duration>
|
||||
<responseAction>fault</responseAction>
|
||||
</timeout>
|
||||
</http>
|
||||
</endpoint>
|
||||
</send>
|
||||
</inSequence>
|
||||
<outSequence>
|
||||
<send/>
|
||||
</outSequence>
|
||||
</resource>
|
||||
<handlers>
|
||||
<handler class="org.wso2.carbon.apimgt.gateway.handlers.ext.APIManagerCacheExtensionHandler"/>
|
||||
<handler class="org.wso2.carbon.apimgt.gateway.handlers.common.SynapsePropertiesHandler"/>
|
||||
</handlers>
|
||||
</api>
|
@ -0,0 +1,25 @@
|
||||
<api xmlns="http://ws.apache.org/ns/synapse" name="_WSO2AMTokenAPI_" context="/token">
|
||||
<resource methods="POST" url-mapping="/*" faultSequence="_token_fault_">
|
||||
<inSequence>
|
||||
<property name="uri.var.portnum" expression="get-property('keyManager.port')"/>
|
||||
<property name="uri.var.hostname" expression="get-property('keyManager.hostname')"/>
|
||||
<send>
|
||||
<endpoint>
|
||||
<http uri-template="https://{uri.var.hostname}:{uri.var.portnum}/oauth2/token">
|
||||
<timeout>
|
||||
<duration>60000</duration>
|
||||
<responseAction>fault</responseAction>
|
||||
</timeout>
|
||||
</http>
|
||||
</endpoint>
|
||||
</send>
|
||||
</inSequence>
|
||||
<outSequence>
|
||||
<send/>
|
||||
</outSequence>
|
||||
</resource>
|
||||
<handlers>
|
||||
<handler class="org.wso2.carbon.apimgt.gateway.handlers.ext.APIManagerCacheExtensionHandler"/>
|
||||
<handler class="org.wso2.carbon.apimgt.gateway.handlers.common.SynapsePropertiesHandler"/>
|
||||
</handlers>
|
||||
</api>
|
@ -0,0 +1,24 @@
|
||||
<api xmlns="http://ws.apache.org/ns/synapse" name="_WSO2AMUserInfoAPI_" context="/userinfo">
|
||||
<resource methods="GET" url-mapping="/*" faultSequence="_token_fault_">
|
||||
<inSequence>
|
||||
<property name="uri.var.portnum" expression="get-property('keyManager.port')"/>
|
||||
<property name="uri.var.hostname" expression="get-property('keyManager.hostname')"/>
|
||||
<send>
|
||||
<endpoint>
|
||||
<http uri-template="https://{uri.var.hostname}:{uri.var.portnum}/oauth2/userinfo">
|
||||
<timeout>
|
||||
<duration>60000</duration>
|
||||
<responseAction>fault</responseAction>
|
||||
</timeout>
|
||||
</http>
|
||||
</endpoint>
|
||||
</send>
|
||||
</inSequence>
|
||||
<outSequence>
|
||||
<send/>
|
||||
</outSequence>
|
||||
</resource>
|
||||
<handlers>
|
||||
<handler class="org.wso2.carbon.apimgt.gateway.handlers.common.SynapsePropertiesHandler"/>
|
||||
</handlers>
|
||||
</api>
|
@ -0,0 +1,145 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<proxy xmlns="http://ws.apache.org/ns/synapse"
|
||||
name="WorkflowCallbackService"
|
||||
transports="https http"
|
||||
startOnLoad="true"
|
||||
trace="disable">
|
||||
<description/>
|
||||
<target>
|
||||
<inSequence>
|
||||
<property name="messageType"
|
||||
value="application/x-www-form-urlencoded"
|
||||
scope="axis2"
|
||||
type="STRING"/>
|
||||
<send>
|
||||
<endpoint>
|
||||
<address uri="https://localhost:9443/store/site/blocks/workflow/workflow-listener/ajax/workflow-listener.jag"
|
||||
format="rest"/>
|
||||
</endpoint>
|
||||
</send>
|
||||
</inSequence>
|
||||
<outSequence>
|
||||
<property name="messageType" value="text/xml" scope="axis2" type="STRING"/>
|
||||
<send/>
|
||||
</outSequence>
|
||||
</target>
|
||||
<publishWSDL>
|
||||
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
|
||||
xmlns:ns1="http://org.apache.axis2/xsd"
|
||||
xmlns:ns="http://callback.workflow.apimgt.carbon.wso2.org"
|
||||
xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
|
||||
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
|
||||
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
|
||||
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
|
||||
targetNamespace="http://callback.workflow.apimgt.carbon.wso2.org">
|
||||
<wsdl:documentation>WorkflowCallbackService</wsdl:documentation>
|
||||
<wsdl:types>
|
||||
<xs:schema attributeFormDefault="qualified"
|
||||
elementFormDefault="qualified"
|
||||
targetNamespace="http://callback.workflow.apimgt.carbon.wso2.org">
|
||||
<xs:element name="resumeEvent">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element minOccurs="0"
|
||||
name="workflowReference"
|
||||
nillable="true"
|
||||
type="xs:string"/>
|
||||
<xs:element minOccurs="0" name="status" nillable="true" type="xs:string"/>
|
||||
<xs:element minOccurs="0"
|
||||
name="description"
|
||||
nillable="true"
|
||||
type="xs:string"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="resumeEventResponse">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element minOccurs="0" name="return" nillable="true" type="xs:string"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:schema>
|
||||
</wsdl:types>
|
||||
<wsdl:message name="resumeEventRequest">
|
||||
<wsdl:part name="parameters" element="ns:resumeEvent"/>
|
||||
</wsdl:message>
|
||||
<wsdl:message name="resumeEventResponse">
|
||||
<wsdl:part name="parameters" element="ns:resumeEventResponse"/>
|
||||
</wsdl:message>
|
||||
<wsdl:portType name="WorkflowCallbackServicePortType">
|
||||
<wsdl:operation name="resumeEvent">
|
||||
<wsdl:input message="ns:resumeEventRequest" wsaw:Action="urn:resumeEvent"/>
|
||||
<wsdl:output message="ns:resumeEventResponse" wsaw:Action="urn:resumeEventResponse"/>
|
||||
</wsdl:operation>
|
||||
</wsdl:portType>
|
||||
<wsdl:binding name="WorkflowCallbackServiceSoap11Binding"
|
||||
type="ns:WorkflowCallbackServicePortType">
|
||||
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
|
||||
<wsdl:operation name="resumeEvent">
|
||||
<soap:operation soapAction="urn:resumeEvent" style="document"/>
|
||||
<wsdl:input>
|
||||
<soap:body use="literal"/>
|
||||
</wsdl:input>
|
||||
<wsdl:output>
|
||||
<soap:body use="literal"/>
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
</wsdl:binding>
|
||||
<wsdl:binding name="WorkflowCallbackServiceSoap12Binding"
|
||||
type="ns:WorkflowCallbackServicePortType">
|
||||
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
|
||||
<wsdl:operation name="resumeEvent">
|
||||
<soap12:operation soapAction="urn:resumeEvent" style="document"/>
|
||||
<wsdl:input>
|
||||
<soap12:body use="literal"/>
|
||||
</wsdl:input>
|
||||
<wsdl:output>
|
||||
<soap12:body use="literal"/>
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
</wsdl:binding>
|
||||
<wsdl:binding name="WorkflowCallbackServiceHttpBinding"
|
||||
type="ns:WorkflowCallbackServicePortType">
|
||||
<http:binding verb="POST"/>
|
||||
<wsdl:operation name="resumeEvent">
|
||||
<http:operation location="resumeEvent"/>
|
||||
<wsdl:input>
|
||||
<mime:content type="text/xml" part="parameters"/>
|
||||
</wsdl:input>
|
||||
<wsdl:output>
|
||||
<mime:content type="text/xml" part="parameters"/>
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
</wsdl:binding>
|
||||
<wsdl:service name="WorkflowCallbackService">
|
||||
<wsdl:port name="WorkflowCallbackServiceHttpsSoap11Endpoint"
|
||||
binding="ns:WorkflowCallbackServiceSoap11Binding">
|
||||
<soap:address location="https://localhost:8243/services/WorkflowCallbackService.WorkflowCallbackServiceHttpsSoap11Endpoint/"/>
|
||||
</wsdl:port>
|
||||
<wsdl:port name="WorkflowCallbackServiceHttpSoap11Endpoint"
|
||||
binding="ns:WorkflowCallbackServiceSoap11Binding">
|
||||
<soap:address location="http://localhost:8280/services/WorkflowCallbackService.WorkflowCallbackServiceHttpSoap11Endpoint/"/>
|
||||
</wsdl:port>
|
||||
<wsdl:port name="WorkflowCallbackServiceHttpsSoap12Endpoint"
|
||||
binding="ns:WorkflowCallbackServiceSoap12Binding">
|
||||
<soap12:address location="https://localhost:8243/services/WorkflowCallbackService.WorkflowCallbackServiceHttpsSoap12Endpoint/"/>
|
||||
</wsdl:port>
|
||||
<wsdl:port name="WorkflowCallbackServiceHttpSoap12Endpoint"
|
||||
binding="ns:WorkflowCallbackServiceSoap12Binding">
|
||||
<soap12:address location="http://localhost:8280/services/WorkflowCallbackService.WorkflowCallbackServiceHttpSoap12Endpoint/"/>
|
||||
</wsdl:port>
|
||||
<wsdl:port name="WorkflowCallbackServiceHttpsEndpoint"
|
||||
binding="ns:WorkflowCallbackServiceHttpBinding">
|
||||
<http:address location="https://localhost:8243/services/WorkflowCallbackService.WorkflowCallbackServiceHttpsEndpoint/"/>
|
||||
</wsdl:port>
|
||||
<wsdl:port name="WorkflowCallbackServiceHttpEndpoint"
|
||||
binding="ns:WorkflowCallbackServiceHttpBinding">
|
||||
<http:address location="http://localhost:8280/services/WorkflowCallbackService.WorkflowCallbackServiceHttpEndpoint/"/>
|
||||
</wsdl:port>
|
||||
</wsdl:service>
|
||||
</wsdl:definitions>
|
||||
</publishWSDL>
|
||||
</proxy>
|
@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!--
|
||||
~ Copyright (c) 2005-2010, WSO2 Inc. (http://wso2.com) All Rights Reserved.
|
||||
~
|
||||
~ WSO2 Inc. licenses this file to you under the Apache License,
|
||||
~ Version 2.0 (the "License"); you may not use this file except
|
||||
~ in compliance with the License.
|
||||
~ You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing,
|
||||
~ software distributed under the License is distributed on an
|
||||
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
~ KIND, either express or implied. See the License for the
|
||||
~ specific language governing permissions and limitations
|
||||
~ under the License.
|
||||
-->
|
||||
|
||||
<!-- Registry declaration of the WSO2 ESB -->
|
||||
<registry xmlns="http://ws.apache.org/ns/synapse" provider="org.wso2.carbon.mediation.registry.WSO2Registry">
|
||||
<!--all resources loaded from the URL registry would be
|
||||
cached for this number of milliseconds -->
|
||||
<parameter name="cachableDuration">15000</parameter>
|
||||
</registry>
|
@ -0,0 +1,4 @@
|
||||
<sequence name="_auth_failure_handler_" xmlns="http://ws.apache.org/ns/synapse">
|
||||
<property name="error_message_type" value="application/xml"/>
|
||||
<sequence key="_cors_request_handler_"/>
|
||||
</sequence>
|
@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!--
|
||||
~ Copyright (c) 2005-2010, WSO2 Inc. (http://wso2.com) All Rights Reserved.
|
||||
~
|
||||
~ WSO2 Inc. licenses this file to you under the Apache License,
|
||||
~ Version 2.0 (the "License"); you may not use this file except
|
||||
~ in compliance with the License.
|
||||
~ You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing,
|
||||
~ software distributed under the License is distributed on an
|
||||
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
~ KIND, either express or implied. See the License for the
|
||||
~ specific language governing permissions and limitations
|
||||
~ under the License.
|
||||
-->
|
||||
<sequence xmlns="http://ws.apache.org/ns/synapse" name="_build_">
|
||||
<builder>
|
||||
<messageBuilder contentType="application/json" class="org.apache.axis2.json.JSONBuilder"
|
||||
formatterClass="org.apache.axis2.json.JSONMessageFormatter"/>
|
||||
<messageBuilder contentType="application/xml" class="org.apache.axis2.builder.ApplicationXMLBuilder"
|
||||
formatterClass="org.apache.axis2.transport.http.ApplicationXMLFormatter"/>
|
||||
</builder>
|
||||
</sequence>
|
@ -0,0 +1,30 @@
|
||||
<sequence xmlns="http://ws.apache.org/ns/synapse" name="_cors_request_handler_">
|
||||
<filter source="$ctx:CORSConfiguration.Enabled" regex="true">
|
||||
<then>
|
||||
<filter source="boolean($trp:Access-Control-Allow-Origin)" regex="false">
|
||||
<then>
|
||||
<property name="Access-Control-Allow-Origin" expression="$ctx:Access-Control-Allow-Origin" scope="transport" type="STRING"/>
|
||||
</then>
|
||||
</filter>
|
||||
<filter source="boolean($trp:Access-Control-Allow-Methods)" regex="false">
|
||||
<then>
|
||||
<property name="Access-Control-Allow-Methods" expression="$ctx:Access-Control-Allow-Methods" scope="transport" type="STRING"/>
|
||||
</then>
|
||||
</filter>
|
||||
<filter source="boolean($trp:Access-Control-Allow-Headers)" regex="false">
|
||||
<then>
|
||||
<property name="Access-Control-Allow-Headers" expression="$ctx:Access-Control-Allow-Headers" scope="transport" type="STRING"/>
|
||||
</then>
|
||||
</filter>
|
||||
<filter source="boolean($trp:Access-Control-Allow-Credentials)" regex="false">
|
||||
<then>
|
||||
<filter source="boolean($ctx:Access-Control-Allow-Credentials)" regex="true">
|
||||
<then>
|
||||
<property name="Access-Control-Allow-Credentials" expression="$ctx:Access-Control-Allow-Credentials" scope="transport" type="STRING"/>
|
||||
</then>
|
||||
</filter>
|
||||
</then>
|
||||
</filter>
|
||||
</then>
|
||||
</filter>
|
||||
</sequence>
|
@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!--
|
||||
~ Copyright (c) 2005-2010, WSO2 Inc. (http://wso2.com) All Rights Reserved.
|
||||
~
|
||||
~ WSO2 Inc. licenses this file to you under the Apache License,
|
||||
~ Version 2.0 (the "License"); you may not use this file except
|
||||
~ in compliance with the License.
|
||||
~ You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing,
|
||||
~ software distributed under the License is distributed on an
|
||||
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
~ KIND, either express or implied. See the License for the
|
||||
~ specific language governing permissions and limitations
|
||||
~ under the License.
|
||||
-->
|
||||
<sequence xmlns="http://ws.apache.org/ns/synapse" name="_production_key_error_">
|
||||
<property name="ERROR_CODE" value="900901"/>
|
||||
<property name="ERROR_MESSAGE" value="Production key offered to the API with no production endpoint"/>
|
||||
<property name="CUSTOM_HTTP_SC" value="403"/>
|
||||
<sequence key="fault"/>
|
||||
</sequence>
|
@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!--
|
||||
~ Copyright (c) 2005-2010, WSO2 Inc. (http://wso2.com) All Rights Reserved.
|
||||
~
|
||||
~ WSO2 Inc. licenses this file to you under the Apache License,
|
||||
~ Version 2.0 (the "License"); you may not use this file except
|
||||
~ in compliance with the License.
|
||||
~ You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing,
|
||||
~ software distributed under the License is distributed on an
|
||||
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
~ KIND, either express or implied. See the License for the
|
||||
~ specific language governing permissions and limitations
|
||||
~ under the License.
|
||||
-->
|
||||
<sequence xmlns="http://ws.apache.org/ns/synapse" name="_resource_mismatch_handler_">
|
||||
<sequence key="fault"/>
|
||||
</sequence>
|
@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!--
|
||||
~ Copyright (c) 2005-2010, WSO2 Inc. (http://wso2.com) All Rights Reserved.
|
||||
~
|
||||
~ WSO2 Inc. licenses this file to you under the Apache License,
|
||||
~ Version 2.0 (the "License"); you may not use this file except
|
||||
~ in compliance with the License.
|
||||
~ You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing,
|
||||
~ software distributed under the License is distributed on an
|
||||
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
~ KIND, either express or implied. See the License for the
|
||||
~ specific language governing permissions and limitations
|
||||
~ under the License.
|
||||
-->
|
||||
<sequence xmlns="http://ws.apache.org/ns/synapse" name="_sandbox_key_error_">
|
||||
<property name="ERROR_CODE" value="900901"/>
|
||||
<property name="ERROR_MESSAGE" value="Sandbox key offered to the API with no sandbox endpoint"/>
|
||||
<property name="CUSTOM_HTTP_SC" value="403"/>
|
||||
<sequence key="fault"/>
|
||||
</sequence>
|
@ -0,0 +1,5 @@
|
||||
<sequence name="_throttle_out_handler_" xmlns="http://ws.apache.org/ns/synapse">
|
||||
<property name="X-JWT-Assertion" scope="transport" action="remove"/>
|
||||
<class name="org.wso2.carbon.apimgt.usage.publisher.APIMgtThrottleUsageHandler"/>
|
||||
<sequence key="_cors_request_handler_"/>
|
||||
</sequence>
|
@ -0,0 +1,40 @@
|
||||
<sequence xmlns="http://ws.apache.org/ns/synapse" name="_token_fault_">
|
||||
<log level="custom">
|
||||
<property name="STATUS" value="Executing token 'fault' sequence"/>
|
||||
<property name="ERROR_CODE" expression="get-property('ERROR_CODE')"/>
|
||||
<property name="ERROR_MESSAGE" expression="get-property('ERROR_MESSAGE')"/>
|
||||
</log>
|
||||
<payloadFactory>
|
||||
<format>
|
||||
<am:fault xmlns:am="http://wso2.org/apimanager">
|
||||
<am:code>$1</am:code>
|
||||
<am:type>Status report</am:type>
|
||||
<am:message>Runtime Error</am:message>
|
||||
<am:description>$2</am:description>
|
||||
</am:fault>
|
||||
</format>
|
||||
<args>
|
||||
<arg expression="$ctx:ERROR_CODE"/>
|
||||
<arg expression="$ctx:ERROR_MESSAGE"/>
|
||||
</args>
|
||||
</payloadFactory>
|
||||
<filter xpath="$ctx:CUSTOM_HTTP_SC">
|
||||
<then>
|
||||
<property name="HTTP_SC" expression="$ctx:CUSTOM_HTTP_SC" scope="axis2"/>
|
||||
</then>
|
||||
<else>
|
||||
<property name="HTTP_SC" value="500" scope="axis2"/>
|
||||
</else>
|
||||
</filter>
|
||||
<property name="RESPONSE" value="true"/>
|
||||
<header name="To" action="remove"/>
|
||||
<property name="NO_ENTITY_BODY" scope="axis2" action="remove"/>
|
||||
<property name="ContentType" scope="axis2" action="remove"/>
|
||||
<property name="Authorization" scope="transport" action="remove"/>
|
||||
<property name="Host" scope="transport" action="remove"/>
|
||||
<property name="Accept" scope="transport" action="remove"/>
|
||||
<property name="messageType" value="application/xml" scope="axis2"/>
|
||||
<sequence key="_cors_request_handler_"/>
|
||||
<send/>
|
||||
<drop/>
|
||||
</sequence>
|
@ -0,0 +1,72 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!--
|
||||
~ Copyright (c) 2005-2010, WSO2 Inc. (http://wso2.com) All Rights Reserved.
|
||||
~
|
||||
~ WSO2 Inc. licenses this file to you under the Apache License,
|
||||
~ Version 2.0 (the "License"); you may not use this file except
|
||||
~ in compliance with the License.
|
||||
~ You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing,
|
||||
~ software distributed under the License is distributed on an
|
||||
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
~ KIND, either express or implied. See the License for the
|
||||
~ specific language governing permissions and limitations
|
||||
~ under the License.
|
||||
-->
|
||||
<sequence xmlns="http://ws.apache.org/ns/synapse" name="fault">
|
||||
<log level="custom">
|
||||
<property name="STATUS" value="Executing default 'fault' sequence"/>
|
||||
<property name="ERROR_CODE" expression="get-property('ERROR_CODE')"/>
|
||||
<property name="ERROR_MESSAGE" expression="get-property('ERROR_MESSAGE')"/>
|
||||
</log>
|
||||
<filter source="get-property('MESSAGE_FORMAT')" regex="soap1[1-2]">
|
||||
<then>
|
||||
<property name="SOAP_FAULT_CODE" value="Server"/>
|
||||
<makefault>
|
||||
<code expression="$ctx:SOAP_FAULT_CODE"/>
|
||||
<reason expression="$ctx:ERROR_MESSAGE"/>
|
||||
</makefault>
|
||||
</then>
|
||||
<else>
|
||||
<payloadFactory>
|
||||
<format>
|
||||
<am:fault xmlns:am="http://wso2.org/apimanager">
|
||||
<am:code>$1</am:code>
|
||||
<am:type>Status report</am:type>
|
||||
<am:message>Runtime Error</am:message>
|
||||
<am:description>$2</am:description>
|
||||
</am:fault>
|
||||
</format>
|
||||
<args>
|
||||
<arg expression="$ctx:ERROR_CODE"/>
|
||||
<arg expression="$ctx:ERROR_MESSAGE"/>
|
||||
</args>
|
||||
</payloadFactory>
|
||||
<filter source="$axis2:HTTP_METHOD" regex="^(?!.*(POST|PUT|PATCH)).*$">
|
||||
<property name="messageType" value="application/xml" scope="axis2"/>
|
||||
</filter>
|
||||
</else>
|
||||
</filter>
|
||||
<filter xpath="$ctx:CUSTOM_HTTP_SC">
|
||||
<then>
|
||||
<property name="HTTP_SC" expression="$ctx:CUSTOM_HTTP_SC" scope="axis2"/>
|
||||
</then>
|
||||
<else>
|
||||
<property name="HTTP_SC" value="500" scope="axis2"/>
|
||||
</else>
|
||||
</filter>
|
||||
<class name="org.wso2.carbon.apimgt.usage.publisher.APIMgtFaultHandler"/>
|
||||
<property name="RESPONSE" value="true"/>
|
||||
<header name="To" action="remove"/>
|
||||
<property name="NO_ENTITY_BODY" scope="axis2" action="remove"/>
|
||||
<property name="ContentType" scope="axis2" action="remove"/>
|
||||
<property name="Authorization" scope="transport" action="remove"/>
|
||||
<property name="Host" scope="transport" action="remove"/>
|
||||
<property name="Accept" scope="transport" action="remove"/>
|
||||
<property name="X-JWT-Assertion" scope="transport" action="remove"/>
|
||||
<sequence key="_cors_request_handler_"/>
|
||||
<send/>
|
||||
</sequence>
|
@ -0,0 +1,99 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!--
|
||||
~ Copyright (c) 2005-2010, WSO2 Inc. (http://wso2.com) All Rights Reserved.
|
||||
~
|
||||
~ WSO2 Inc. licenses this file to you under the Apache License,
|
||||
~ Version 2.0 (the "License"); you may not use this file except
|
||||
~ in compliance with the License.
|
||||
~ You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing,
|
||||
~ software distributed under the License is distributed on an
|
||||
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
~ KIND, either express or implied. See the License for the
|
||||
~ specific language governing permissions and limitations
|
||||
~ under the License.
|
||||
-->
|
||||
|
||||
<!-- Default main sequence shipped with the WSO2 ESB -->
|
||||
<sequence xmlns="http://ws.apache.org/ns/synapse" name="main">
|
||||
<description>The default main sequence for API manager - Returns 404 Not Found</description>
|
||||
<in>
|
||||
<log level="custom">
|
||||
<property name="STATUS" value="Message dispatched to the main sequence. Invalid URL."/>
|
||||
<property name="RESOURCE" expression="fn:concat('/', $axis2:REST_URL_POSTFIX)"/>
|
||||
</log>
|
||||
<filter source="$ctx:TRANSPORT_DENIED" regex="true">
|
||||
<payloadFactory>
|
||||
<format>
|
||||
<am:fault xmlns:am="http://wso2.org/apimanager">
|
||||
<am:code>403</am:code>
|
||||
<am:type>Status report</am:type>
|
||||
<am:message>Forbidden</am:message>
|
||||
<am:description>Unsupported Transport [ $2 ]. The requested resource (/$1) is not available.</am:description>
|
||||
</am:fault>
|
||||
</format>
|
||||
<args>
|
||||
<arg expression="$axis2:REST_URL_POSTFIX"/>
|
||||
<arg expression="$ctx:IN_TRANSPORT"/>
|
||||
</args>
|
||||
</payloadFactory>
|
||||
<property name="HTTP_SC" value="403" scope="axis2"/>
|
||||
<property name="RESPONSE" value="true"/>
|
||||
<header name="To" action="remove"/>
|
||||
<property name="NO_ENTITY_BODY" scope="axis2" action="remove"/>
|
||||
<property name="ContentType" scope="axis2" action="remove"/>
|
||||
<property name="Authorization" scope="transport" action="remove"/>
|
||||
<property name="Host" scope="transport" action="remove"/>
|
||||
<property name="Accept" scope="transport" action="remove"/>
|
||||
<send/>
|
||||
<drop/>
|
||||
</filter>
|
||||
<filter source="get-property('MESSAGE_FORMAT')" regex="soap1[1-2]">
|
||||
<then>
|
||||
<property name="SOAP_FAULT_CODE" value="Server"/>
|
||||
<makefault>
|
||||
<code expression="$ctx:SOAP_FAULT_CODE"/>
|
||||
<reason value="The requested endpoint is not available."/>
|
||||
</makefault>
|
||||
</then>
|
||||
<else>
|
||||
<payloadFactory>
|
||||
<format>
|
||||
<am:fault xmlns:am="http://wso2.org/apimanager">
|
||||
<am:code>404</am:code>
|
||||
<am:type>Status report</am:type>
|
||||
<am:message>Not Found</am:message>
|
||||
<am:description>The requested resource (/$1) is not available.</am:description>
|
||||
</am:fault>
|
||||
</format>
|
||||
<args>
|
||||
<arg expression="$axis2:REST_URL_POSTFIX"/>
|
||||
</args>
|
||||
</payloadFactory>
|
||||
</else>
|
||||
</filter>
|
||||
<filter source="$axis2:HTTP_METHOD" regex="^(?!.*(POST|PUT|PATCH)).*$">
|
||||
<property name="messageType" value="application/xml" scope="axis2"/>
|
||||
</filter>
|
||||
<property name="HTTP_SC" value="404" scope="axis2"/>
|
||||
<property name="RESPONSE" value="true"/>
|
||||
<header name="To" action="remove"/>
|
||||
<property name="NO_ENTITY_BODY" scope="axis2" action="remove"/>
|
||||
<property name="ContentType" scope="axis2" action="remove"/>
|
||||
<property name="Authorization" scope="transport" action="remove"/>
|
||||
<property name="Host" scope="transport" action="remove"/>
|
||||
<property name="Accept" scope="transport" action="remove"/>
|
||||
<property name="X-JWT-Assertion" scope="transport" action="remove"/>
|
||||
<send/>
|
||||
<drop/>
|
||||
</in>
|
||||
<out>
|
||||
<log level="full">
|
||||
<property name="STATUS" value="Unexpected response message in out flow"/>
|
||||
</log>
|
||||
<drop/>
|
||||
</out>
|
||||
</sequence>
|
@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!--
|
||||
~ Copyright (c) 2005-2010, WSO2 Inc. (http://wso2.com) All Rights Reserved.
|
||||
~
|
||||
~ WSO2 Inc. licenses this file to you under the Apache License,
|
||||
~ Version 2.0 (the "License"); you may not use this file except
|
||||
~ in compliance with the License.
|
||||
~ You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing,
|
||||
~ software distributed under the License is distributed on an
|
||||
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
~ KIND, either express or implied. See the License for the
|
||||
~ specific language governing permissions and limitations
|
||||
~ under the License.
|
||||
-->
|
||||
|
||||
<!-- An empty flat synapse configuration shipped with the WSO2 ESB -->
|
||||
<definitions xmlns="http://ws.apache.org/ns/synapse">
|
||||
|
||||
<!-- You can add any flat sequences, endpoints, etc.. to this synapse.xml file if you do
|
||||
*not* want to keep the artifacts in several files -->
|
||||
</definitions>
|
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,10 @@
|
||||
<module name="sso" xmlns="http://wso2.org/projects/jaggery/module.xml">
|
||||
<script>
|
||||
<name>client</name>
|
||||
<path>scripts/sso.client.js</path>
|
||||
</script>
|
||||
<module name="sso" expose="false" xmlns="http://wso2.org/projects/jaggery/module.xml">
|
||||
<script>
|
||||
<name>client</name>
|
||||
<path>scripts/sso.client.js</path>
|
||||
</script>
|
||||
<hostObject>
|
||||
<className>org.wso2.carbon.hostobjects.sso.SAMLSSORelyingPartyObject</className>
|
||||
<name>SSORelyingParty</name>
|
||||
</hostObject>
|
||||
</module>
|
@ -0,0 +1,7 @@
|
||||
<module name="tenantmanager" namespace="ns" expose="true" xmlns="http://wso2.org/projects/jaggery/module.xml">
|
||||
<hostObject>
|
||||
<className>org.wso2.carbon.apimgt.hostobjects.TenantManagerHostObject</className>
|
||||
<name>TenantManager</name>
|
||||
</hostObject>
|
||||
</module>
|
||||
|
Loading…
Reference in new issue