我在wso2网站上关注这个tutorial,但是没有关于将java处理程序放在哪里进行授权的信息。
有人知道该把它放在哪里吗?以及如何让它与API资源协同工作?
发布于 2016-10-28 22:37:40
此处理程序将应用于所有资源。
<api xmlns="http://ws.apache.org/ns/synapse"
name="TestGoogle"
context="/search">
<resource methods="GET">
<inSequence>
<log level="full">
<property name="STATUS" value="***** REQUEST HITS IN SEQUENCE *****"/>
</log>
<send>
<endpoint>
<http method="get" uri-template="https://www.google.lk/search?q=wso2"/>
</endpoint>
</send>
</inSequence>
</resource>
<handlers>
<handler class="org.wso2.handler.SimpleOAuthHandler"/>
</handlers>
</api>发布于 2016-10-29 01:43:21
您可以在API的结束标记之前添加处理程序,保存后,API可能不会显示处理程序,但如果您查看源代码视图,则可以看到分配给API的处理程序。(主->源代码视图)
发布于 2016-10-29 09:41:41
您必须将包含处理程序的jar复制到[ESB_HOME]/repository/component/lib并重启服务器。该处理程序将作为<api>的子级添加到API配置中。
<handlers>
<handler class="org.wso2.rest.BasicAuthHandler"/>
</handlers>https://stackoverflow.com/questions/40298037
复制相似问题