2017-03-20 33 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