}
private void redirectToOpenIdRegistrationUrl(HttpServletRequest request, HttpServletResponse response, AuthenticationException exception) throws IOException, ServletException {
DefaultRedirectStrategy redirectStrategy = new DefaultRedirectStrategy();
addOpenIdAttributesToSession(request, getOpenIdAuthenticationToken((OpenIDUserNotFoundException) exception));
redirectStrategy.sendRedirect(request, response, openIdRegistrationUrl);
}
private void addOpenIdAttributesToSession(HttpServletRequest request, OpenIDAuthenticationToken openIdAuthenticationToken) throws ServletException {
HttpSession session = request.getSession();
sessionShouldBePresent(session);