2017-01-05 19 views
1

私はWso2 Identityサーバーを使用しており、管理サービスを使用してユーザーを作成しています。私の問題はそれらのユーザーはシステムにログインすることができませんです。 以下は私たちが org.wso2.carbon.identity.framework org.wso2.carbon.identity.mgt.stub 5.6.14 org.wso2.carbon org.wso2.carbonを使用しているLIBS、あります.utils 4.4.10 のXerces xercesImpl にJaxen xercesImpl com.ibm.icu ICU4J org.wso2.carbon.identity.user.ws org.wso2.carbon.um.ws.api.stub 5.1.3 コモンズ・ログ コモンズ・ログ 組織.wso2.carbon.identity.framework org.wso2.carbon.identity.user.registration.stub 5.6.14 org.wso2.carbon.identity.framework org.wso2.carb以下は 5.6.14 ユーザー管理サービスWSO2 Identity Server

<dependency> 
     <groupId>org.apache.axis2.wso2</groupId> 
     <artifactId>axis2</artifactId> 
     <version>1.6.1.wso2v12</version> 
    </dependency> 
    <dependency> 
     <groupId>org.apache.ws.commons.axiom.wso2</groupId> 
     <artifactId>axiom</artifactId> 
     <version>1.2.11.wso2v10</version> 
    </dependency> 
    <!-- <dependency> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> 
     </dependency> --> 
    <dependency> 
     <groupId>org.wso2.carbon.identity.framework</groupId> 
     <artifactId>org.wso2.carbon.identity.user.profile.stub</artifactId> 
     <version>5.6.14</version> 
    </dependency> 
    <dependency> 
     <groupId>javax.servlet</groupId> 
     <artifactId>jstl</artifactId> 
    </dependency> 
    <dependency> 
     <groupId>org.wso2.carbon.identity.agent.sso.java</groupId> 
     <artifactId>org.wso2.carbon.identity.sso.agent</artifactId> 
     <version>5.1.3</version> 
     <exclusions> 
      <exclusion> 
       <groupId>org.slf4j</groupId> 
       <artifactId>slf4j-api</artifactId> 
      </exclusion> 
      <exclusion> 
       <groupId>org.wso2.orbit.org.opensaml</groupId> 
       <artifactId>opensaml</artifactId> 
      </exclusion> 
     </exclusions> 
    </dependency> 


    <dependency> 
     <groupId>org.apache.axis2</groupId> 
     <artifactId>axis2-spring</artifactId> 
     <version>1.6.1-wso2v12</version> 
    </dependency> 

    <dependency> 
     <groupId>org.wso2.orbit.org.opensaml</groupId> 
     <artifactId>opensaml</artifactId> 
     <version>2.6.4.wso2v3</version> 
    </dependency> 

on.user.mgt.stubすることは私のコード

String[] roles = {"Application/myOAunth", "Internal/everyone"}; 
    ClaimValue sub = new ClaimValue(); 
    sub.setClaimURI("sub"); 
    sub.setValue(userSignUpRequest.getFirstName()); 
    ClaimValue fullName = new ClaimValue(); 
    fullName.setClaimURI("http://wso2.org/claims/fullname"); 
    fullName.setValue(userSignUpRequest.getFirstName() + " " + userSignUpRequest.getLastName()); 
    ClaimValue firstName = new ClaimValue(); 
    firstName.setClaimURI("http://wso2.org/claims/givenname"); 
    firstName.setValue(userSignUpRequest.getFirstName()); 
    ClaimValue email = new ClaimValue(); 
    email.setClaimURI(" http://wso2.org/claims/emailaddress"); 
    email.setValue(userSignUpRequest.getFirstName()); 
    ClaimValue accountDisabled = new ClaimValue(); 
    accountDisabled.setClaimURI("http://wso2.org/claims/identity/accountDisabled"); 
    accountDisabled.setValue("false"); 
    ClaimValue[] claims = {fullName, sub, accountDisabled, firstName}; 
    try { 
     admin.addUser(userSignUpRequest.getEmailId(), userSignUpRequest.getPassword(), roles, claims, "default"); 
    } catch (AxisFault e) { 
     throw new GenericException(e.getMessage(), HttpStatus.INTERNAL_SERVER_ERROR.value()); 
    } 
+1

あなたが作成したユーザーでIdentity Serverの管理コンソールにログインしようとしていますか?その場合、そのユーザーはログイン許可を持つロールを持つ必要があります。 – pulasthi7

+0

このリンク[1]はあなたに役立つかもしれません。 [1] https://docs.wso2.com/display/IS500/Role-based+Permissions –

+0

いいえ、そのユーザーはOAuthアプリケーションにログインしません。私はそれらの役割を割り当てました。と許可。 –

答えて

1

WSO2における管理サービスのために必要な権限であるあなたがここで見つけることができ IS [1]。

[1] https://docs.wso2.com/display/IS510/Permissions+Required+to+Invoke+Admin+Services

+0

私はユーザーを作成できますが、そのユーザーはoauthアプリケーションでログインできません。 –

+0

新しいロールを作成し、oauthに必要な権限を割り当てます(上記のドキュメントに従って)。その後、その役割をユーザーに割り当てます。 –

+1

同じことをやっているが、ユーザーがログインできなかったときにリンクをたどった http://xacmlinfo.org/2014/10/07/email-username-with-identity-server/ アイデンティティ管理confは私のために働いた。 :)ありがとう –

関連する問題