【问题标题】:WSO2 Identity Server can not add user with more than one claim value through the APIWSO2 Identity Server 无法通过 API 添加具有多个声明值的用户
【发布时间】:2012-08-05 08:36:33
【问题描述】:

我正在尝试使用 UserStoreManager 在 WSO2 身份服务器中添加用户帐户。添加具有或不具有一个声明值的用户没有问题,但是当我尝试在声明的映射中添加多个声明值时,它会抛出一个异常:

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");

【问题讨论】:

    标签: exception wso2 axis2 wso2is user-management


    【解决方案1】:

    你用的是什么IS版本?

    顺便说一句,请试试这个

    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");
    

    【讨论】:

      猜你喜欢
      • 2017-02-11
      • 2012-06-24
      • 2012-08-09
      • 1970-01-01
      • 1970-01-01
      • 2016-04-23
      • 1970-01-01
      • 2013-01-13
      • 1970-01-01
      相关资源
      最近更新 更多