SEC-1349: Allow configuration of OpenID with parameters which should be transferred to the return_to URL.
The OpenIDAuthenticationFilter now has a returnToUrlParameters property (a Set). If this is set, the named parameters will be copied from the incoming submitted request to the return_to URL. If not set, it defaults to the "parameter" property of the AbstractRememberMeServices of the parent class. If remember-me is not in use, it defaults to the empty set. Enabled remember-me in the OpenID sample.
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
- Sample namespace-based configuration
|
||||
-
|
||||
- Namespace-based OpenID configuration
|
||||
-->
|
||||
|
||||
<b:beans xmlns="http://www.springframework.org/schema/security"
|
||||
@@ -21,8 +20,12 @@
|
||||
<openid-attribute name="name" type="http://schema.openid.net/namePerson/friendly" />
|
||||
</attribute-exchange>
|
||||
</openid-login>
|
||||
<remember-me token-repository-ref="tokenRepo"/>
|
||||
</http>
|
||||
|
||||
<b:bean id="tokenRepo"
|
||||
class="org.springframework.security.web.authentication.rememberme.InMemoryTokenRepositoryImpl" />
|
||||
|
||||
<authentication-manager alias="authenticationManager"/>
|
||||
|
||||
<user-service id="userService">
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<form name="f" action="<c:url value='j_spring_openid_security_check'/>" method="POST">
|
||||
<table>
|
||||
<tr><td>OpenID Identity:</td><td><input type='text' name='openid_identifier' value='<c:if test="${not empty param.login_error}"><c:out value="${SPRING_SECURITY_LAST_USERNAME}"/></c:if>'/></td></tr>
|
||||
|
||||
<tr><td><input type="checkbox" name="_spring_security_remember_me"></td><td>Remember me on this computer.</td></tr>
|
||||
<tr><td colspan='2'><input name="submit" type="submit"></td></tr>
|
||||
<tr><td colspan='2'><input name="reset" type="reset"></td></tr>
|
||||
</table>
|
||||
|
||||
Reference in New Issue
Block a user