0

Appfuse - Spring security、Struts、および urlrewrite を使用しており、アプリにログインする前にアクションを呼び出そうとしています (パスワード機能を忘れてしまいました)。

問題は、ユーザーがログインしているときにしかアクションにアクセスできないことです。アクションはログイン ページにリダイレクトされています。

パターン<http pattern="/resetPassword/**" security="none"/>をsecurity.xmlに追加しました

および urlrewrite.xml の次のルール

<rule>
    <from>/resetPassword</from>
    <to>/resetPassword</to>
</rule>

私のsecurity.xml

    <http pattern="/images/**" security="none"/>
<http pattern="/styles/**" security="none"/>
<http pattern="/scripts/**" security="none"/>
<http pattern="/assets/**" security="none"/>
<http pattern="/resetPassword/**" security="none"/>

<http auto-config="true">
    <intercept-url pattern="/admin/**" access="ROLE_ADMIN"/>
    <intercept-url pattern="/passwordHint*" access="ROLE_ANONYMOUS,ROLE_ADMIN,ROLE_USER"/>
    <intercept-url pattern="/signup*" access="ROLE_ANONYMOUS,ROLE_ADMIN,ROLE_USER"/>
    <intercept-url pattern="/saveSignup*" access="ROLE_ANONYMOUS,ROLE_ADMIN,ROLE_USER"/>
    <intercept-url pattern="/**/*.action*" access="ROLE_ADMIN,ROLE_USER"/>
    <form-login login-page="/login" authentication-failure-url="/login?error=true" login-processing-url="/j_security_check" always-use-default-target = "true"/>
    <remember-me user-service-ref="userDao" key="e37f4b31-0c45-11dd-bd0b-0800200c9a66"/>
</http>

<authentication-manager>
    <authentication-provider user-service-ref="userDao">
        <password-encoder ref="passwordEncoder">
        </password-encoder>
    </authentication-provider>
</authentication-manager>

<!-- Override the default password-encoder (BCrypt) by uncommenting the following and changing the class -->
<!-- <bean id="passwordEncoder" class="org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder"/> -->

<global-method-security>
    <protect-pointcut expression="execution(* *..service.UserManager.getUsers(..))" access="ROLE_ADMIN"/>
    <protect-pointcut expression="execution(* *..service.UserManager.removeUser(..))" access="ROLE_ADMIN"/>
</global-method-security>

何が欠けているのでしょうか?

4

0 に答える 0