Exception WSO2 Identity Server无法通过API添加具有多个声明值的用户
我正在尝试使用UserStoreManager在WSO2 identity Server中添加用户帐户。添加具有或不具有一个声明值的用户没有问题,但当我尝试在声明映射中添加多个声明值时,会引发异常:Exception WSO2 Identity Server无法通过API添加具有多个声明值的用户,exception,wso2,axis2,wso2is,user-management,Exception,Wso2,Axis2,Wso2is,User Management,我正在尝试使用UserStoreManager在WSO2 identity Server中添加用户帐户。添加具有或不具有一个声明值的用户没有问题,但当我尝试在声明映射中添加多个声明值时,会引发异常: org.wso2.carbon.um.ws.api.WSUserStoreManager handleException SEVERE: Can not access the directory context oruser already exists in the system org.apa
org.wso2.carbon.um.ws.api.WSUserStoreManager handleException
SEVERE: Can not access the directory context oruser already exists in the system
org.apache.axis2.AxisFault: Can not access the directory context oruser already exists in the system..
这是我使用的代码
Map<String, String> claims = new HashMap<String, String>();
claims.put("http://wso2.org/claims/givenname", "John");
//second value causing the exception
claims.put("http://wso2.org/claims/lastname", "Doe");
STORE_MANAGER.addUser("JohnDoe", "123456",
new String[] { Constants.DEFAULT_ROLE }, claims, "default");
Map claims=newhashmap();
申索http://wso2.org/claims/givenname“,”约翰“);
//导致异常的第二个值
申索http://wso2.org/claims/lastname“,“Doe”);
STORE_MANAGER.addUser(“约翰多”、“123456”,
新字符串[]{Constants.DEFAULT_ROLE},声明为“DEFAULT”);
您使用的版本是什么
顺便说一句,请试试这个
Map<String, String> claims = new HashMap<String, String>();
claims.put("http://wso2.org/claims/givenname", "John");
claims.put("http://wso2.org/claims/lastname", "Doe");
remoteUserStoreManager.addUser("JohnDoe", "123456",null, claims, "default");
Map claims=newhashmap();
申索http://wso2.org/claims/givenname“,”约翰“);
申索http://wso2.org/claims/lastname“,“Doe”);
addUser(“JohnDoe”,“123456”,null,声明为“default”);