Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: Add cookie in auth.pipeline.post Authenticator
Hi;
I call a web service to retrieve a certain value after login , and i need to set this value in a cookie, i implemented an authenticator class with the property = {"key=auth.pipeline.post"}, now authenticator is called successfully and the value is retrieved from the web service, is there any way to add this value to a cookie and send back to the browser after successful authentication.
hm...I'm not sure if this will work but the only thing I can think of is to try ServiceContextThreadLocal and then get the HttpServletResponse from the ServiceContext.
If that doesn't work, then I think you'll have to set the cookie in a different place. If you only have the value here, maybe use a threadLocal to store the value and retrieve it later to add the cookie?
Powered by Liferay™