Session handling in VisionX Webapp

Hi I wanted to save some attribute in session and then i am redirecting to google for authorization(https://www.googleapis.com/oauth2/v1/userinfo). Later from saved attribute i want to perform some more task.
- Code: Select all
HttpContext hctxt = HttpContext.getCurrentInstance();
Object request = hctxt.getRequest();
//final GoogleAuthHelper helper = new GoogleAuthHelper();
if(((ServletRequest) request).getParameter("code") != null && ((ServletRequest) request).getParameter("state") != null)
{
if (request instanceof HttpServletRequest)
{
tmp = ((HttpServletRequest)request).getHeader("User-Agent");
tmpsession = ((HttpServletRequest)request).getSession().getId();
System.out.println(tmp + "/br " + tmpsession);
//helper.getUserInfoJson(tmpsession);
}
}