OpenIDAuthenticationToken token = (OpenIDAuthenticationToken)exception.getAuthentication();
String url = token.getIdentityUrl();
User user = createTemporaryUser(token, url);
request.getSession(true).setAttribute(ModelKeys.NEW_USER, user);
DefaultRedirectStrategy redirectStrategy = new DefaultRedirectStrategy();
log.info("Redirecting to new user account creation page");
super.setRedirectStrategy(redirectStrategy);
redirectStrategy.sendRedirect(request, response, "/"+ViewNames.CREATE_ACCOUNT_PAGE);
return;
} else {
super.onAuthenticationFailure(request, response, exception);
}
}