<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>Add cookie in auth.pipeline.post Authenticator</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=111476117" />
  <subtitle>Add cookie in auth.pipeline.post Authenticator</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=111476117</id>
  <updated>2026-04-06T17:11:57Z</updated>
  <dc:date>2026-04-06T17:11:57Z</dc:date>
  <entry>
    <title>RE: Add cookie in auth.pipeline.post Authenticator</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111586432" />
    <author>
      <name>Amos Fong</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111586432</id>
    <updated>2018-11-17T01:34:04Z</updated>
    <published>2018-11-17T01:34:04Z</published>
    <summary type="html">&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;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?&lt;/p&gt;</summary>
    <dc:creator>Amos Fong</dc:creator>
    <dc:date>2018-11-17T01:34:04Z</dc:date>
  </entry>
  <entry>
    <title>Add cookie in auth.pipeline.post Authenticator</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111476116" />
    <author>
      <name>N H</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111476116</id>
    <updated>2018-11-07T12:05:29Z</updated>
    <published>2018-11-07T12:05:29Z</published>
    <summary type="html">&lt;p&gt;Hi;&lt;/p&gt;
&lt;p&gt;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 = {&amp;quot;key=auth.pipeline.post&amp;quot;}, 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.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</summary>
    <dc:creator>N H</dc:creator>
    <dc:date>2018-11-07T12:05:29Z</dc:date>
  </entry>
</feed>
