1

Seam の Identity Management を使用して Seam 2 でログインを作成しようとしています。RDB に mysql 5.1 を使用しています。すでにログイン ページを作成し、components.xml認証用に変更しました。しかし、ここに問題があります。UI からログイン ボタンをクリックすると、ログインに失敗しました。しかし、ログから、以下に示すように DB を照会することができます。

10:27:40,670 INFO  [STDOUT] Hibernate: 
10:27:40,670 INFO  [STDOUT]     select
10:27:40,671 INFO  [STDOUT]         user0_.id as id10_,
10:27:40,671 INFO  [STDOUT]         user0_.email as email10_,
10:27:40,671 INFO  [STDOUT]         user0_.password as password10_,
10:27:40,671 INFO  [STDOUT]         user0_.userName as userName10_,
10:27:40,671 INFO  [STDOUT]         user0_.version as version10_ 
10:27:40,671 INFO  [STDOUT]     from
10:27:40,671 INFO  [STDOUT]         User user0_ 
10:27:40,671 INFO  [STDOUT]     where
10:27:40,672 INFO  [STDOUT]         user0_.userName=? limit ?

しかし、一致userName&passwordしないか、何か他の理由で、ログインが成功しません。login.xhtmlマイページはこちら

<h:form id="loginForm">

            <rich:panel>
                <f:facet name="header">Login</f:facet>

                <p>Please login here</p>

                <div class="dialog">
                    <h:panelGrid columns="2" rowClasses="prop"
                        columnClasses="name,value">
                        <h:outputLabel for="username">Username</h:outputLabel>
                        <h:inputText id="username" value="#{credentials.username}" />
                        <h:outputLabel for="password">Password</h:outputLabel>
                        <h:inputSecret id="password" value="#{credentials.password}" />
                        <h:outputLabel for="rememberMe">Remember me</h:outputLabel>
                        <h:selectBooleanCheckbox id="rememberMe"
                            value="#{rememberMe.enabled}" />
                    </h:panelGrid>
                </div>

            </rich:panel>

            <div class="actionButtons">
                <h:commandButton id="submitBtn" value="Login"
                    action="#{identity.login()}" />
            </div>

        </h:form>

ここに私の関連部分がありますcomponent.xml

<!-- USER AND ROLE -->
<security:jpa-identity-store role-class="com.galaksiya.kobar.entity.Role"
    user-class="com.galaksiya.kobar.entity.User" />
<!-- IDENTITY STORE AND ROLE STORE -->
<security:identity-manager identity-store="#{jpaIdentityStore}"
    role-identity-store="#{jpaIdentityStore}" />

ここRoleに文書化されているように、Userクラスに注釈を付けました。しかし、ログインに失敗する理由がわかりません。

どんな助けでも大歓迎です。ありがとう。

4

0 に答える 0