URGENT - SecurityContext is not set after successful OAM authentication
894780Sep 22 2012 — edited Sep 27 2012Hi All,
I am trying to access a protected resource from OAM,before that I am creating a session Id thorugh OAM SDK API and using it in creation of ObSSOCookie as below and setting this in the HTTP header.
Everything seems to be working fine, but securityContext is not set and it shows an unauthenticated one , but since this is a programmatic way of generating a session from OAM and creation of ObSSOCookie , I am unable to figure out why securityContext is not set.
When I am explicitly entering username/password in the challenge URL for a protected resource, securityContext is set appropriately and flow is working fine ,but above is not doing the same.
Please help me out as this is urgent.
Cookie obCookie = new Cookie("ObSSOCookie", sessId); // sessId generated through OAM SDK API
obCookie.setDomain("16.181.234.164");
obCookie.setPath("/");
HttpServletResponse res = (HttpServletResponse) FacesContext.getCurrentInstance().getExternalContext().getResponse();
res.addCookie(obCookie);
res.setHeader("VF_MIG_STATUS", "migrated");
res.setHeader("OAM_REMOTE_USER", "vodafoneuser");
In the browser cookies, I can see ObSSOCookie is created and I am able to access an OAM protected resource also, but security context still shows anonymous.
Thanks and Regards,
Gaurav