2017-03-20 35 views
1

当令牌生成请求使用“授予型=密码”,而credentails是无效的,返回的响应是400WSO2 API管理器错误代码无效

我希望我的API Manager实例返回401(无效凭证)。我在哪里做出改变。

回答

0

您可以像这样修改令牌API突触文件(repository/deployment/server/synapse-configs/default/api/_TokenAPI_.xml)的排序顺序。

<outSequence> 
    <filter source="json-eval(error_description)" regex=".*Authentication failed for.*"> 
     <then> 
      <property name="HTTP_SC" value="401" scope="axis2"/> 
     </then> 
     <else></else> 
    </filter> 
    <send/> 
</outSequence> 
+0

非常感谢。它按预期工作。 – WsoWanderer