title: How to define the response url at OpenIDAuthenticationFilter?
body: <p>I have a <code>CustomOpenIDAuthenticationFilter</code> extends <code>org.springframework.security.openid.OpenIDAuthenticationFilter</code>. <strike>I want to define the response url after the authentication is successful</strike>, but do not know how to do it. Any help you might have would be very much appreciated. </p>
  
  <p>I have the following code at the moment:</p>
  
  <pre><code>public class CustomOpenIDAuthenticationFilter extends OpenIDAuthenticationFilter{
  protected static Logger logger = Logger.getLogger("service");
  
      public CustomOpenIDAuthenticationFilter(){
          super();
          ProxyProperties proxyProps = new ProxyProperties();
          proxyProps.setProxyHostName(PROXYNAME);
          proxyProps.setProxyPort(PROXYPORT);
          HttpClientFactory.setProxyProperties(proxyProps);
      }
  
      public Authentication attemptAuthentication(HttpServletRequest request, HttpServletResponse response)
  throws AuthenticationException, IOException {   
          //i think the response url should be defined here. 
          Authentication au = super.attemptAuthentication(request, response);     
          return au;
      }
  }
  </code></pre>
  
  <p><b>Edit</b></p>
  
  <p>Sorry for your time, i did not explain my problem correctly.
  So, when my login page is sending authentication request to openid provider, the request contains a returnToUrl, where is "The URL on the Consumer site where the OpenID Provider will return the user after generating the authentication response. ". On a non-spring application, i would do </p>
  
  <pre><code>AuthRequest authRequest = manager.authenticate(discovered, returnToUrl);
  </code></pre>
  
  <p>My question is how could I specify this returnToUrl at my CustomOpenIDAuthenticationFilter.</p>