//response.sendRedirect("login.jsp");
request.getRequestDispatcher("/login").forward(request, response);
return null;
}else{
if(session.getAttribute("parameterlist")!=null){
ParameterList requestp=(ParameterList) session.getAttribute("parameterlist");
String openidrealm=requestp.hasParameter("openid.realm") ? requestp.getParameterValue("openid.realm") : null;
String openidreturnto=requestp.hasParameter("openid.return_to") ? requestp.getParameterValue("openid.return_to") : null;
String openidclaimedid=requestp.hasParameter("openid.claimed_id") ? requestp.getParameterValue("openid.claimed_id") : null;
String openididentity=requestp.hasParameter("openid.identity") ? requestp.getParameterValue("openid.identity") : null;
session.setAttribute("openid.realm", openidrealm);
session.setAttribute("openid.return_to", openidreturnto);
session.setAttribute("openid.claimed_id", openidclaimedid );
session.setAttribute("openid.identity", openididentity);
session.setAttribute("authenticatedAndApproved", authorizedUser);
}
}
}
ServerManager manager = ((SimpleServiceProxy)getServiceProxy()).getServerManager();
// extract the parameters from the request
ParameterList parameterList = null;
if (session.getAttribute("parameterlist")!=null) {
parameterList = (ParameterList) session.getAttribute("parameterlist");
} else {
parameterList = new ParameterList(request.getParameterMap());
}
String mode = parameterList.hasParameter("openid.mode") ? parameterList.getParameterValue("openid.mode") : null;
log.debug("openid.mode:" + mode);
if(StringUtils.isEmpty(mode)){
//request.getRequestDispatcher("login.jsp").forward(request, response);
response.sendRedirect("/idp4java/login");
return null;