I'm using CustomAuthentication
provider to authenticate which extends AbstractUserDetailsAuthenticationProvider
. This I had to do because I wanted to authenticate against a webservice and needed both userid as well as password. This was the only class which allowed me to do so.
Now I'm facing issues implementing remember-me functionality for this, here is my security-context file -
<http auto-config="true">
<intercept-url pattern="/j_spring_security_check" access="IS_AUTHENTICATED_ANONYMOUSLY"/>
<intercept-url pattern="/dashboard*" access="ROLE_USER" />
<form-login login-page="/login.html" default-target-url="/dashboard1.html#meetings"
authentication-failure-url="/loginFailed.html" />
<logout logout-success-url="/login.html" />
</http>
<beans:bean name="customAuthenticationProvider" class = "com.component.WebServiceUserDetailsAuthenticationProvider"/>
<authentication-manager>
<authentication-provider ref = "customAuthenticationProvider"/>
</authentication-manager>
</beans:beans>
Now I'm trying to implement remember me, but it's enforcing me to have user detail service that I can't have as I need both username and password to authenticate agains my web service and method exposed by userdetailservice gives only username not password and that's the reason I had to use customAuthentication at first place.