<?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>AutoLogin called every time private page clicked</title>
  <link rel="self" href="https://uat.liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=113773689" />
  <subtitle>AutoLogin called every time private page clicked</subtitle>
  <id>https://uat.liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=113773689</id>
  <updated>2026-10-15T11:16:49Z</updated>
  <dc:date>2026-10-15T11:16:49Z</dc:date>
  <entry>
    <title>RE: AutoLogin called every time private page clicked</title>
    <link rel="alternate" href="https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114341626" />
    <author>
      <name>Olaf Kock</name>
    </author>
    <id>https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114341626</id>
    <updated>2019-07-17T09:18:11Z</updated>
    <published>2019-07-17T09:18:11Z</published>
    <summary type="html">&lt;div class="quote-title"&gt;saravanan muniraj:&lt;/div&gt;&lt;blockquote&gt;&lt;br /&gt;Thanks Eric,JSESSIONID is not set for the  cluster server . How to fix it ?&lt;br /&gt;&lt;/blockquote&gt;Tomcat, or any application server, will set the JSESSIONID cookie to make sure that the client&amp;#39;s session will be referenced in future requests. If you actively work against it, you&amp;#39;ll find that somewhere in your infrastructure (it might just be the browser denying cookies, it might be the loadbalancer ignoring them).&lt;br /&gt;The settings that you quote have nothing to do with the web layer setting cookies to the browser.&lt;br /&gt;Without the session cookie, there&amp;#39;s simply no persisted authentication, thus you&amp;#39;ll have to re-authenticate every single request.</summary>
    <dc:creator>Olaf Kock</dc:creator>
    <dc:date>2019-07-17T09:18:11Z</dc:date>
  </entry>
  <entry>
    <title>RE: AutoLogin called every time private page clicked</title>
    <link rel="alternate" href="https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114336546" />
    <author>
      <name>saravanan muniraj</name>
    </author>
    <id>https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114336546</id>
    <updated>2019-07-16T19:50:40Z</updated>
    <published>2019-07-16T19:50:40Z</published>
    <summary type="html">Thanks Eric,JSESSIONID is not set for the  cluster server . How to fix it ?&lt;br /&gt;&lt;br /&gt;below is the Clustered configuration on portal-ext.properties# server 1&lt;br /&gt;cluster.link.enabled=true&lt;br /&gt;cluster.link.autodetect.address=&amp;lt;db-server-name&amp;gt;:1433&lt;br /&gt;web.server.display.node=true&lt;br /&gt;&lt;br /&gt;# server 2&lt;br /&gt;cluster.link.enabled=true&lt;br /&gt;cluster.link.autodetect.address=&amp;lt;db-server-name&amp;gt;:1433&lt;br /&gt;web.server.display.node=true</summary>
    <dc:creator>saravanan muniraj</dc:creator>
    <dc:date>2019-07-16T19:50:40Z</dc:date>
  </entry>
  <entry>
    <title>RE: AutoLogin called every time private page clicked</title>
    <link rel="alternate" href="https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113893954" />
    <author>
      <name>Eric COQUELIN</name>
    </author>
    <id>https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113893954</id>
    <updated>2019-06-04T21:01:48Z</updated>
    <published>2019-06-04T21:01:48Z</published>
    <summary type="html">I haven&amp;#39;t checked but may be the AutoLogin be called everytime...&lt;br /&gt;After authentication, you should have one cookie being set : JSESSIONID. Can you check ?&lt;br /&gt;From that moment, for each request, Liferay will check against this cookie and if valid will consider your used as logged in.</summary>
    <dc:creator>Eric COQUELIN</dc:creator>
    <dc:date>2019-06-04T21:01:48Z</dc:date>
  </entry>
  <entry>
    <title>RE: AutoLogin called every time private page clicked</title>
    <link rel="alternate" href="https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113868161" />
    <author>
      <name>saravanan muniraj</name>
    </author>
    <id>https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113868161</id>
    <updated>2019-06-03T20:02:56Z</updated>
    <published>2019-06-03T20:02:56Z</published>
    <summary type="html">Actually the issue is after user Authenticated and logged in successfully , again  AutoLogin called in multiple times for the same user immediate after login. &lt;br /&gt;To resolve this issue I thought setting &lt;br /&gt;session.timeout=40,session.timeout.auto.extend=true&lt;br /&gt;session.timeout.auto.extend.offset=300&lt;br /&gt;session.timeout=40&lt;br /&gt;auth.simultaneous.logins=false in portal.ext.properties   would help. &lt;br /&gt;See the below code for Customization AutoLogin code .  Please do point What would be likely cause  for this issues &lt;br /&gt;public String[] login(&lt;br /&gt;   {&lt;br /&gt;    final String[] credentials = new String[3];&lt;br /&gt;    Cookie cookie = getCookie((HttpServletRequest) request, PropsUtil.get(COOKIE_NAME));    if(cookie == null){&lt;br /&gt;        request.setAttribute(AutoLogin.AUTO_LOGIN_REDIRECT, getRedirectUrl(request));&lt;br /&gt;    }else{&lt;br /&gt;        ValidateCookieResponse validateCookieResponse = Authenticate(cookie.getValue());&lt;br /&gt;        if(validateCookieResponse != null){&lt;br /&gt;                String userName = validateCookieResponse.getUser().getUserLogin();                                                  &lt;br /&gt;                    if (StringUtils.isBlank(userName)){&lt;br /&gt;                        request.setAttribute(AutoLogin.AUTO_LOGIN_REDIRECT, getRedirectUrl(request));&lt;br /&gt;                    }else{&lt;br /&gt;                        long companyId = PortalUtil.getCompanyId(request);&lt;br /&gt;                        com.liferay.portal.kernel.model.User user = null;&lt;br /&gt;                        try {&lt;br /&gt;                            user = UserLocalServiceUtil.getUserByScreenName(companyId, userName);&lt;br /&gt;                        } catch (PortalException e) {&lt;br /&gt;                            request.setAttribute(AutoLogin.AUTO_LOGIN_REDIRECT, getRedirectUrl(request));&lt;br /&gt;                        }&lt;br /&gt;                        if(user != null){                               credentials[0] = String.valueOf(user.getUserId());&lt;br /&gt;                            credentials[1] = user.getPassword()&lt;br /&gt;                            credentials[2] = String.valueOf(user.isPasswordEncrypted()) ;                                                              &lt;br /&gt;                            return credentials;&lt;br /&gt;                        }else{                            request.setAttribute(AutoLogin.AUTO_LOGIN_REDIRECT, getRedirectUrl(request));&lt;br /&gt;                        }&lt;br /&gt;                    }&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;        }else{            request.setAttribute(AutoLogin.AUTO_LOGIN_REDIRECT, getRedirectUrl(request));&lt;br /&gt;        }&lt;br /&gt;    return credentials;&lt;br /&gt;thanks</summary>
    <dc:creator>saravanan muniraj</dc:creator>
    <dc:date>2019-06-03T20:02:56Z</dc:date>
  </entry>
  <entry>
    <title>RE: AutoLogin called every time private page clicked</title>
    <link rel="alternate" href="https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113857809" />
    <author>
      <name>Olaf Kock</name>
    </author>
    <id>https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113857809</id>
    <updated>2019-06-02T10:11:34Z</updated>
    <published>2019-06-02T10:11:34Z</published>
    <summary type="html">It doesn&amp;#39;t sound like this will likely solve your problem, but there&amp;#39;s at least one with the configuration you quote: With &amp;lt;session-timeout&amp;gt;30&amp;lt;/session-timeout&amp;gt; the appserver &lt;em&gt;will&lt;/em&gt; time out your session in 30 minutes. With session.timeout=40, Liferay will assume that the appserver times out the session after 40 minutes. In other words, when Liferay attempts to extend the session after 40 minutes (session.timeout.auto.extend=true), the session is long gone. At a minimum, both should be the same value. If they&amp;#39;re different, Liferay&amp;#39;s portal-ext.properties value should be &lt;em&gt;lower&lt;/em&gt; than the appserver&amp;#39;s.</summary>
    <dc:creator>Olaf Kock</dc:creator>
    <dc:date>2019-06-02T10:11:34Z</dc:date>
  </entry>
  <entry>
    <title>AutoLogin called every time private page clicked</title>
    <link rel="alternate" href="https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113773688" />
    <author>
      <name>saravanan muniraj</name>
    </author>
    <id>https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113773688</id>
    <updated>2019-05-30T14:53:21Z</updated>
    <published>2019-05-30T14:53:21Z</published>
    <summary type="html">All our site pages are private pages , So the user are forced to login first (Cookie based authentication ) override the AutoLogin  as per the Liferay 7 documentation (&lt;a href="https://dev.liferay.com/en/develop/tutorials/-/knowledge_base/7-0/auto-login"&gt;https://dev.liferay.com/en/develop/tutorials/-/knowledge_base/7-0/auto-login&lt;/a&gt;)User authentication works as expected , establish the session  too . but every time user click  any  private pages AutoLogin call again.&amp;lt;session-timeout&amp;gt;30&amp;lt;/session-timeout&amp;gt;  is being set in web.xml&lt;br /&gt;the following are the properties settingsession.timeout.warning=0&lt;br /&gt;session.timeout.auto.extend=true&lt;br /&gt;session.timeout.auto.extend.offset=300&lt;br /&gt;session.timeout=40&lt;br /&gt;auth.simultaneous.logins=false&lt;br /&gt;As per I understanding , Autologin called first and establish the  user sessions , till the sessions persist autologin class should not be invoked again.  please let me know  if I missing any setting or configuration . Liferay DXP 7.0 is used.&lt;br /&gt;thanks</summary>
    <dc:creator>saravanan muniraj</dc:creator>
    <dc:date>2019-05-30T14:53:21Z</dc:date>
  </entry>
</feed>
