Здравствуйте. Необходимо добавить remembe me, но оно не работает, вообще вот мой конфиг
| Код | <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p" xmlns:security="http://www.springframework.org/schema/security" xmlns:jdbc="http://www.springframework.org/schema/jdbc" xmlns:beans="http://www.springframework.org/schema/beans" xsi:schemaLocation="http://www.springframework.org/schema/beans [URL=http://www.springframework.org/schema/beans/spring-beans-3.1.xsd]http://www.springframework.org/schema/bean...g-beans-3.1.xsd[/URL] [URL=http://www.springframework.org/schema/security]http://www.springframework.org/schema/security[/URL] [URL=http://www.springframework.org/schema/security/spring-security-3.1.xsd]http://www.springframework.org/schema/secu...ecurity-3.1.xsd[/URL] [URL=http://www.springframework.org/schema/jdbc]http://www.springframework.org/schema/jdbc[/URL] [URL=http://www.springframework.org/schema/jdbc/spring-jdbc.xsd">]http://www.springframework.org/schema/jdbc...p;quot;>[/URL]
<security:global-method-security secured-annotations="enabled"/>
<bean id="passwordEncoder" class="org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder"/>
<security:http auto-config="false" authentication-manager-ref="myAuthenticationManager" use-expressions="true" entry-point-ref="authenticationEntryPoint" >
<security:intercept-url pattern="/login" access="permitAll" /> <security:intercept-url pattern="/css/**" access="permitAll"/> <security:intercept-url pattern="/js/**" access="permitAll"/> <security:intercept-url pattern="/img/**" access="permitAll"/>
<security:intercept-url pattern="/regions" access="hasRole('ROLE_USER')"/> <security:intercept-url pattern="/scriptList/**" access="hasRole('ROLE_USER')"/> <security:intercept-url pattern="/show/**" access="hasRole('ROLE_USER')"/> <security:intercept-url pattern="/admin/**" access="hasRole('ROLE_ADMIN')"/>
<security:remember-me key="sau" services-ref="rememberMeServices" />
<security:intercept-url pattern="/**" access="isAuthenticated()"/> <security:logout logout-success-url="/login" invalidate-session="true" logout-url="/logout" />
<security:logout logout-url="/logout" invalidate-session="true" success-handler-ref="logoutHandler" delete-cookies="JSESSIONID"/> </security:http>
<beans:bean id="authenticationEntryPoint" class="org.springframework.security.web.authentication.LoginUrlAuthenticationEntryPoint"> <property name="loginFormUrl" value="/login"/> <beans:property name="useForward" value="true"/> </beans:bean> <bean id="logoutHandler" class=""ru.lat.sau.handler.LogoutHandler"/>
<bean id="myAuthenticationProvider" class="ru.lat.sau.manager.UserManager"/>
<security:authentication-manager id="myAuthenticationManager" > <security:authentication-provider ref="myAuthenticationProvider"/> </security:authentication-manager>
<bean id="rememberMeServices" class="org.springframework.security.web.authentication.rememberme.TokenBasedRememberMeServices"> <property name="userDetailsService" ref="myAuthenticationProvider"/> <property name="key" value="springRocks"/> </bean>
</beans>
|
Подскажите, пожалуйста, что не так. Заранее спасибо всем за участие |