<?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>RE: Liferay sceenlet pass session to webview</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=86074234" />
  <subtitle>RE: Liferay sceenlet pass session to webview</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=86074234</id>
  <updated>2026-06-27T07:42:10Z</updated>
  <dc:date>2026-06-27T07:42:10Z</dc:date>
  <entry>
    <title>RE: Liferay sceenlet pass session to webview</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=105506057" />
    <author>
      <name>lu deyuan</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=105506057</id>
    <updated>2018-03-19T09:47:17Z</updated>
    <published>2018-03-19T09:47:17Z</published>
    <summary type="html">Thank you for your reply. I am sorry that the server is being upgraded today, and I will test this method immediately after the server has been restored.</summary>
    <dc:creator>lu deyuan</dc:creator>
    <dc:date>2018-03-19T09:47:17Z</dc:date>
  </entry>
  <entry>
    <title>RE: Liferay sceenlet pass session to webview</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=105509358" />
    <author>
      <name>Victor Galan</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=105509358</id>
    <updated>2018-03-19T09:40:55Z</updated>
    <published>2018-03-19T09:40:55Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;It's very strange because internally it is doing the same request that you did with the cURL and that worked&lt;br&gt;&lt;br&gt;Can you try this now:&lt;br&gt;&lt;br&gt;&lt;pre&gt;&lt;code&gt;
CookieAuthentication authentication =
			new CookieAuthentication("", "", "&amp;lt;your-screen-name&amp;gt;", "&amp;lt;your-password&amp;gt;");

		Session session = new SessionImpl("&amp;lt;your-server-url&amp;gt;", authentication);

		CookieSignIn.signIn(session, new CookieSignIn.CookieCallback() {
			@Override
			public void onSuccess(Session session) {
				Log.d("LOGIN", "Login correct");
			}

			@Override
			public void onFailure(Exception e) {
				Log.e("LOGIN", "Login error", e);
			}
&amp;lt;/your-server-url&amp;gt;&amp;lt;/your-password&amp;gt;&amp;lt;/your-screen-name&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;&lt;br&gt;Regards&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Victor Galan</dc:creator>
    <dc:date>2018-03-19T09:40:55Z</dc:date>
  </entry>
  <entry>
    <title>RE: Liferay sceenlet pass session to webview</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=105402699" />
    <author>
      <name>lu deyuan</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=105402699</id>
    <updated>2018-03-16T15:18:28Z</updated>
    <published>2018-03-16T15:18:28Z</published>
    <summary type="html">Today I tried the latest version（3.1.0） and failed.</summary>
    <dc:creator>lu deyuan</dc:creator>
    <dc:date>2018-03-16T15:18:28Z</dc:date>
  </entry>
  <entry>
    <title>RE: Liferay sceenlet pass session to webview</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=105393201" />
    <author>
      <name>Victor Galan</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=105393201</id>
    <updated>2018-03-16T12:00:16Z</updated>
    <published>2018-03-16T12:00:16Z</published>
    <summary type="html">Can you try with the version 3.1.0 of screens?</summary>
    <dc:creator>Victor Galan</dc:creator>
    <dc:date>2018-03-16T12:00:16Z</dc:date>
  </entry>
  <entry>
    <title>RE: Liferay sceenlet pass session to webview</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=105382353" />
    <author>
      <name>lu deyuan</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=105382353</id>
    <updated>2018-03-16T08:03:29Z</updated>
    <published>2018-03-16T08:03:29Z</published>
    <summary type="html">Hi，Is there a way to solve this problem now?</summary>
    <dc:creator>lu deyuan</dc:creator>
    <dc:date>2018-03-16T08:03:29Z</dc:date>
  </entry>
  <entry>
    <title>RE: Liferay sceenlet pass session to webview</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=105305270" />
    <author>
      <name>lu deyuan</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=105305270</id>
    <updated>2018-03-15T01:42:01Z</updated>
    <published>2018-03-15T01:42:01Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;Hi&lt;br&gt;I receiver status code 302.&lt;br&gt;But if I use &lt;pre&gt;&lt;code&gt;&amp;lt;your-liferay-server&amp;gt;/login?p_p_id=58&amp;amp;amp;p_p_lifecycle=0&amp;amp;amp;p_p_state=maximized&amp;amp;amp;p_p_mode=view&amp;amp;amp;saveLastPath=false&amp;amp;amp;_58_struts_action=%2Flogin%2Flogin&amp;lt;/your-liferay-server&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;I can receiving a correct status code.&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>lu deyuan</dc:creator>
    <dc:date>2018-03-15T01:42:01Z</dc:date>
  </entry>
  <entry>
    <title>RE: Liferay sceenlet pass session to webview</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=105254112" />
    <author>
      <name>Victor Galan</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=105254112</id>
    <updated>2018-03-14T10:13:25Z</updated>
    <published>2018-03-14T10:13:25Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;Can you execute this cURL request and tell me if you are receiving a correct status code?&lt;br&gt;&lt;br&gt;&lt;pre&gt;&lt;code&gt;
curl -X POST \
  &amp;lt;your-liferay-server&amp;gt;/c/portal/login \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -H 'Cookie: COOKIE_SUPPORT=true;' \
  -d 'login=&amp;lt;screen-name&amp;gt;&amp;amp;amp;password=&amp;lt;password&amp;gt;'
&amp;lt;/password&amp;gt;&amp;lt;/screen-name&amp;gt;&amp;lt;/your-liferay-server&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Victor Galan</dc:creator>
    <dc:date>2018-03-14T10:13:25Z</dc:date>
  </entry>
  <entry>
    <title>RE: Liferay sceenlet pass session to webview</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=105249934" />
    <author>
      <name>lu deyuan</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=105249934</id>
    <updated>2018-03-14T09:16:40Z</updated>
    <published>2018-03-14T09:16:40Z</published>
    <summary type="html">liferay-screens:2.1.1&lt;br /&gt;portal version:6.2</summary>
    <dc:creator>lu deyuan</dc:creator>
    <dc:date>2018-03-14T09:16:40Z</dc:date>
  </entry>
  <entry>
    <title>RE: Liferay sceenlet pass session to webview</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=105250859" />
    <author>
      <name>Victor Galan</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=105250859</id>
    <updated>2018-03-14T09:09:27Z</updated>
    <published>2018-03-14T09:09:27Z</published>
    <summary type="html">I meant the Liferay screens version, and the portal version?</summary>
    <dc:creator>Victor Galan</dc:creator>
    <dc:date>2018-03-14T09:09:27Z</dc:date>
  </entry>
  <entry>
    <title>RE: Liferay sceenlet pass session to webview</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=105249752" />
    <author>
      <name>lu deyuan</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=105249752</id>
    <updated>2018-03-14T09:03:10Z</updated>
    <published>2018-03-14T09:03:10Z</published>
    <summary type="html">android sdk 6.2</summary>
    <dc:creator>lu deyuan</dc:creator>
    <dc:date>2018-03-14T09:03:10Z</dc:date>
  </entry>
  <entry>
    <title>RE: Liferay sceenlet pass session to webview</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=105250801" />
    <author>
      <name>Victor Galan</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=105250801</id>
    <updated>2018-03-14T09:01:40Z</updated>
    <published>2018-03-14T09:01:40Z</published>
    <summary type="html">It&amp;#39;s not needed, what version of the library are you using?</summary>
    <dc:creator>Victor Galan</dc:creator>
    <dc:date>2018-03-14T09:01:40Z</dc:date>
  </entry>
  <entry>
    <title>RE: Liferay sceenlet pass session to webview</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=105249638" />
    <author>
      <name>lu deyuan</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=105249638</id>
    <updated>2018-03-14T08:50:15Z</updated>
    <published>2018-03-14T08:50:15Z</published>
    <summary type="html">If don&amp;#39;t use loginMode，I can login successfully&lt;br /&gt;Is server needs to configure cookies related Settings.</summary>
    <dc:creator>lu deyuan</dc:creator>
    <dc:date>2018-03-14T08:50:15Z</dc:date>
  </entry>
  <entry>
    <title>RE: Liferay sceenlet pass session to webview</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=105248152" />
    <author>
      <name>Victor Galan</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=105248152</id>
    <updated>2018-03-14T08:22:53Z</updated>
    <published>2018-03-14T08:22:53Z</published>
    <summary type="html">Hi!&lt;br /&gt;&lt;br /&gt;This error normally appears when the credentials are incorrect&lt;br /&gt;I see that are you using screen_name as the basicAuthMethod, do you have that configured in the server too?&lt;br /&gt;&lt;br /&gt;Regards</summary>
    <dc:creator>Victor Galan</dc:creator>
    <dc:date>2018-03-14T08:22:53Z</dc:date>
  </entry>
  <entry>
    <title>RE: Liferay sceenlet pass session to webview</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=105246171" />
    <author>
      <name>lu deyuan</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=105246171</id>
    <updated>2018-03-14T08:11:10Z</updated>
    <published>2018-03-14T08:11:10Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;When I using liferay:loginMode="cookie" in your LoginScreenlet,then login failed。&lt;br&gt;&lt;pre&gt;&lt;code&gt;&amp;lt;com.liferay.mobile.screens.auth.login.loginscreenlet android:id="@+id/login_screenlet" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_centerHorizontal="true" android:layout_below="@+id/include" liferay:basicAuthMethod="screen_name" liferay:companyId="@string/id_company" liferay:loginMode="cookie" liferay:layoutId="@layout/view_login_main" /&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;&lt;br&gt;&lt;span style="color: #ff0707"&gt;&lt;strong&gt;Below is the login error message.&lt;/strong&gt;&lt;/span&gt;&lt;br&gt;Could not login&lt;br&gt;                                                                       com.liferay.mobile.android.exception.AuthenticationException: Cookie invalid or empty&lt;br&gt;                                                                           at com.liferay.mobile.android.auth.CookieSignIn.parseResponse(CookieSignIn.java:143)&lt;br&gt;                                                                           at com.liferay.mobile.android.auth.CookieSignIn.signIn(CookieSignIn.java:55)&lt;br&gt;                                                                           at com.liferay.mobile.screens.auth.login.interactor.LoginCookieInteractor.execute(LoginCookieInteractor.java:33)&lt;br&gt;                                                                           at com.liferay.mobile.screens.base.interactor.BaseInteractor.doInBackground(BaseInteractor.java:38)&lt;br&gt;                                                                           at com.liferay.mobile.screens.base.interactor.BaseInteractor$1.run(BaseInteractor.java:31)&lt;br&gt;                                                                           at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)&lt;br&gt;                                                                           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)&lt;br&gt;                                                                           at java.lang.Thread.run(Thread.java:761)&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>lu deyuan</dc:creator>
    <dc:date>2018-03-14T08:11:10Z</dc:date>
  </entry>
  <entry>
    <title>RE: Liferay sceenlet pass session to webview</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=101268867" />
    <author>
      <name>Javier Gamarra</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=101268867</id>
    <updated>2017-12-20T08:29:41Z</updated>
    <published>2017-12-20T08:29:41Z</published>
    <summary type="html">Step 1: how to get cookie from Liferay？&lt;br /&gt;&lt;br /&gt;Using liferay:loginMode=&amp;#34;cookie&amp;#34; in your LoginScreenlet&lt;br /&gt;&lt;br /&gt;Step 2: how to put cookie into webview？&lt;br /&gt;&lt;br /&gt;It&amp;#39;s done automatically if you use that loginMode &lt;img alt="emoticon" src="@theme_images_path@/emoticons/happy.gif" &gt;</summary>
    <dc:creator>Javier Gamarra</dc:creator>
    <dc:date>2017-12-20T08:29:41Z</dc:date>
  </entry>
  <entry>
    <title>RE: Liferay sceenlet pass session to webview</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=101268368" />
    <author>
      <name>lu deyuan</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=101268368</id>
    <updated>2017-12-20T07:39:04Z</updated>
    <published>2017-12-20T07:39:04Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;I'm still confused by the web view's cookie, and here's how I actually use it.&lt;br&gt;&lt;br&gt;&lt;strong&gt;Log in using screnntlet&lt;/strong&gt;&lt;br&gt;&lt;pre&gt;&lt;code&gt;&amp;lt;com.liferay.mobile.screens.auth.login.loginscreenlet android:id="@+id/login_screenlet" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_centerhorizontal="true" android:layout_below="@+id/include" liferay:basicauthmethod="screen_name" liferay:companyid="@string/id_company" liferay:layoutid="@layout/view_login_main"&amp;gt;&amp;lt;/com.liferay.mobile.screens.auth.login.loginscreenlet&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;&lt;br&gt;Step 1: how to get cookie from Liferay？&lt;br&gt;Step 2: how to put cookie into webview？&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>lu deyuan</dc:creator>
    <dc:date>2017-12-20T07:39:04Z</dc:date>
  </entry>
  <entry>
    <title>RE: Liferay sceenlet pass session to webview</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=100310108" />
    <author>
      <name>Javier Gamarra</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=100310108</id>
    <updated>2017-12-07T11:43:41Z</updated>
    <published>2017-12-07T11:43:41Z</published>
    <summary type="html">Yes, it will also work on 6.2</summary>
    <dc:creator>Javier Gamarra</dc:creator>
    <dc:date>2017-12-07T11:43:41Z</dc:date>
  </entry>
  <entry>
    <title>RE: Liferay sceenlet pass session to webview</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=100290426" />
    <author>
      <name>lu deyuan</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=100290426</id>
    <updated>2017-12-07T00:39:07Z</updated>
    <published>2017-12-07T00:39:07Z</published>
    <summary type="html">Thank you for your reply. However, for some reason, I can only use the 6.2 version, open the webview prompt and need to login,Can I get cookies on version 6.2.</summary>
    <dc:creator>lu deyuan</dc:creator>
    <dc:date>2017-12-07T00:39:07Z</dc:date>
  </entry>
  <entry>
    <title>RE: Liferay sceenlet pass session to webview</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=100259650" />
    <author>
      <name>Javier Gamarra</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=100259650</id>
    <updated>2017-12-06T19:14:38Z</updated>
    <published>2017-12-06T19:14:38Z</published>
    <summary type="html">Cookie login is the way &lt;img alt="emoticon" src="@theme_images_path@/emoticons/happy.gif" &gt;&lt;br /&gt;&lt;br /&gt;Available on the latest screens version &lt;img alt="emoticon" src="@theme_images_path@/emoticons/smile.gif" &gt;</summary>
    <dc:creator>Javier Gamarra</dc:creator>
    <dc:date>2017-12-06T19:14:38Z</dc:date>
  </entry>
  <entry>
    <title>RE: Liferay sceenlet pass session to webview</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=100213505" />
    <author>
      <name>lu deyuan</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=100213505</id>
    <updated>2017-12-06T11:51:39Z</updated>
    <published>2017-12-06T11:51:39Z</published>
    <summary type="html">I also have such a problem, how to solve now?</summary>
    <dc:creator>lu deyuan</dc:creator>
    <dc:date>2017-12-06T11:51:39Z</dc:date>
  </entry>
</feed>
