WSO2 API 授权类型密码无效的管理器错误代码
WSO2 API Manager error code for grant type password invalid
根据使用 "grant-type=password" 生成令牌的请求,虽然凭据无效,但响应 returned 是 400。
我希望我的 API 管理器实例为 return 401(无效凭据)。我在哪里进行更改。
您可以像这样修改 Token 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>
根据使用 "grant-type=password" 生成令牌的请求,虽然凭据无效,但响应 returned 是 400。
我希望我的 API 管理器实例为 return 401(无效凭据)。我在哪里进行更改。
您可以像这样修改 Token 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>