public void onAuthenticationSuccess(HttpServletRequest request, HttpServletResponse response,
Authentication authentication)
throws IOException, ServletException {
if (isOpenIdAuthentication(request, authentication)) {
UniqueKeyUserDetails userDetails = (UniqueKeyUserDetails) authentication.getPrincipal();
String returnUrl = this.openIdManager.getAuthenticationResponseReturnToUrl(request,
userDetails.getUniqueKey(),
authentication.isAuthenticated());
response.sendRedirect(returnUrl);
} else {
super.onAuthenticationSuccess(request, response, authentication);
}