I use CAS and Spring Security 3.0. But I can't check password. How can I do it?
My configuration xml is:
<bean id="authenticationUserDetailsService" class="app.MyAuthenticationUserDetailsService"/>
<bean id="proxyGrantingTicketStorage" class="org.jasig.cas.client.proxy.ProxyGrantingTic ketStorageImpl"/>
<bean id="myPasswordEncoder" class="app.MyPasswordEncoder">
</bean>
<sec:http entry-point-ref="casProcessingFilterEntryPoint">
<sec:intercept-url pattern="/forgotpass.xhtml" access="ROLE_ANONYMOUS"/>
<sec:intercept-url pattern="/error.xhtml" access="ROLE_ANONYMOUS"/>
<sec:intercept-url pattern="/*.xhtml" access="ROLE_USER"/>
<sec:custom-filter ref="casAuthenticationFilter" after="CAS_FILTER"/>
</sec:http>
<sec:authentication-manager alias="authenticationManager">
<sec:authentication-provider ref="casAuthenticationProvider">
<sec: password-encoder ref="myPasswordEncoder"/>
</sec:authentication-provider>
</sec:authentication-manager>
<bean id="casAuthenticationFilter" class="org.springframework.security.cas.web.CasAut henticationFilter">
<property name="authenticationManager" ref="authenticationManager"/>
<property name="authenticationFailureHandler">
<bean class="org.springframework.security.web.authentica tion.SimpleUrlAuthenticationFailureHandler">
<property name="defaultFailureUrl" value="/error.xhtml"/>
<property name="useForward" value="true"/>
</bean>
</property>
<property name="authenticationSuccessHandler">
<bean class="org.springframework.security.web.authentica tion.SimpleUrlAuthenticationSuccessHandler">
</bean>
</property>
<property name="proxyGrantingTicketStorage" ref="proxyGrantingTicketStorage"/>
<property name="proxyReceptorUrl" value="/secure/receptor"/>
</bean>
<bean id="casAuthenticationProvider" class="org.springframework.security.cas.authentica tion.CasAuthenticationProvider">
<property name="authenticationUserDetailsService" ref="authenticationUserDetailsService"/>
<property name="serviceProperties" ref="serviceProperties"/>
<property name="ticketValidator">
<bean class="org.jasig.cas.client.validation.Cas20Servic eTicketValidator">
<constructor-arg index="0" value="https://localhost:8443/cas"/>
<property name="proxyGrantingTicketStorage" ref="proxyGrantingTicketStorage"/>
<property name="proxyCallbackUrl" value="http://localhost:8080/app/secure/receptor"/>
</bean>
</property>
<property name="key" value="an_id_for_this_auth_provider_only"/>
</bean>
<bean id="casProcessingFilterEntryPoint" class="org.springframework.security.cas.web.CasAut henticationEntryPoint">
<property name="loginUrl" value="https://localhost:8443/cas/login"/>
<property name="serviceProperties" ref="serviceProperties"/>
</bean>
<bean id="serviceProperties" class="org.springframework.security.cas.ServicePro perties">
<property name="sendRenew" value="false"/>
<property name="service" value="http://localhost:8080/app/j_spring_cas_security_check"/>
</bean>
method of MyAuthenticationUserDetailsService returns UserDetail with username and encoded password.
MyPasswordEncoder encode it with same algorithm.
But 1)I put logs to MyPasswordEncoder and it doesn't riched
2) I try to enter to system with user 'admin' and password 'admin11'(it is right), but I can enter only with password 'admin'.
Is my way to check user and password wrong?



