我使用了spring security to login选项。现在我要添加一个更改密码option.first的时候,用户登录到系统的更改密码选项需要出现或重定向到更改密码页面。这是我的spring安全文件
<bean id="daoAuthenticationProvider"
class="org.springframework.security.authentication.dao.DaoAuthenticationProvider">
<property name="userDetailsService" ref="userDetailsService" />
</bean>
<bean id="authenticationManager"
class="org.springframework.security.authentication.ProviderManager">
<property name="providers">
<list>
<ref local="daoAuthenticationProvider" />
</list>
</property>
</bean>
<security:authentication-manager>
<security:authentication-provider user-service-ref="userDetailsService">
<security:password-encoder ref="passwordEncoder">
<security:salt-source ref="saltSource"/>
</security:password-encoder>
</security:authentication-provider>
</security:authentication-manager>
<bean id="saltSource" class="com.rcfi.lankaweb.linklk.support.service.SaltService"></bean>
<bean id="passwordEncoder" class="com.rcfi.lankaweb.linklk.support.service.PasswordVerifier"></bean>
<bean id="userDetailsService"
class="com.rcfi.lankaweb.linklk.support.service.UserDetailsServiceImpl">
</bean>发布于 2011-09-06 17:02:30
在您的com.rcfi.lankaweb.linklk.support.service.UserDetailsServiceImpl中创建一个change password方法这将获取新的字符串,并通过您的用户dao (可能)将其保存到数据库
https://stackoverflow.com/questions/7303382
复制相似问题