Hi all
I am using Spring security 3 with openID, there are something I want to use my own demand.
1. use own filterProcessesUrl
the default openid check url is j_spring_openid_security_check, but I want it to be openidlogin(e.g.), so it could be configured in filter, but what I did didn't work.
My configuration is as follows:
I also configured a entrypoint which it needed. I know we can custom a filter and use position adding it to FilterChainProxy, But I just override OpenIDAuthenticationFilter, how can I do?Code:<!-- custom filter --> <b:bean id="openIdFilter" class="org.springframework.security.openid.OpenIDAuthenticationFilter"> <b:property name="authenticationManager" ref="authenticationManager" /> <b:property name="filterProcessesUrl" value="/openidlogin" /> <b:property name="defaultTargetUrl" value="/sso" /> <b:property name="alwaysUseDefaultTargetUrl" value="true" /> <b:property name="authenticationFailureUrl" value="/openid/login.jsp?login_error=true" /> </b:bean>
2. use own provider
The default OpenIDAuthenticationProvider must use userDetailsService, but I didn't want to use it, so I need to override OpenIDAuthenticationProvider,
but it doesn't work, the spec instruct me how to do like that. so how can I do?Code:<b:bean id="customAuthenticationProvider" class="com.dingfei.openid.provider.MyOpenIDProvider" /> <authentication-manager> <authentication-provider ref="customAuthenticationProvider" /> </authentication-manager>
the http configuration is as follows:
generally, could anyone can tell me how to custom(override) Spring security filter or provider?Code:<http> <intercept-url pattern="/**" access="ROLE_USER"/> <intercept-url pattern="/openidlogin.jsp*" filters="none"/> <logout/> <openid-login login-page="/openidlogin.jsp" authentication-failure-url="/openidlogin.jsp?login_error=true" default-target-url="/success.jsp"> <attribute-exchange> <openid-attribute name="email" type="http://schema.openid.net/contact/email" required="true" count="1"/> <openid-attribute name="name" type="http://schema.openid.net/namePerson/friendly" /> </attribute-exchange> </openid-login> <remember-me token-repository-ref="tokenRepo"/> </http>
Best regards!


