WSO2 Identity Server 7.0.0声明更新API请求格式错误求助
解决WSO2 Identity Server 7.0.0声明更新API的UE-10000错误
错误原因分析
你遇到的UE-10000错误是请求体字段格式不符合WSO2 IS 7.0.0声明更新API的规范,具体存在3个关键问题:
- 本地方言声明的
dialectURI值错误 attributeMapping中的userstore字段格式错误regEx空字符串不被API接受
修正后的请求示例
修正错误字段后的完整curl命令如下:
curl -X 'PUT' 'https://localhost:9443/api/server/v1/claim-dialects/local/claims/aHR0cDovL3dzbzIub3JnL2NsYWltcy9pZGVudGl0eS9lbWFpbFZlcmlmaWVk' -H 'accept: */*' -H 'Authorization: Basic YWRtaW46YWRtaW4=' -H 'Content-Type: application/json' -d '{"claimURI":"http://wso2.org/claims/identity/emailVerified","dialectURI":"http://wso2.org/claims/local","description":"Email Verified","displayOrder":0,"displayName":"Email Verified","readOnly":false,"regEx":null,"required":false,"supportedByDefault":false,"attributeMapping":[{"mappedAttribute":"emailVerified","userstore":{"domainName":"PRIMARY"}}],"properties":[]}' -k
关键修正点说明
- dialectURI修正:本地(local)方言的正确URI是
http://wso2.org/claims/local,而非通用的http://wso2.org/claims - attributeMapping结构修正:
userstore字段必须是包含domainName属性的对象,不能直接传字符串 - regEx修正:空正则表达式需设为
null,而非空字符串""
验证方式
可通过本地WSO2 IS的Swagger UI(https://localhost:9443/swagger-ui/)找到Claim Management下的Update a local claim接口,查看官方定义的请求体Schema,确保字段格式完全匹配。
内容的提问来源于stack exchange,提问作者Anusha Pathirana
相关产品推荐
相关产品推荐

