<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: CakePHP Auth Component &#8211; Will You Remember Me Tomorrow?</title>
	<atom:link href="http://www.webdevelopment2.com/cakephp-auth-component-tutorial-3/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.webdevelopment2.com/cakephp-auth-component-tutorial-3/</link>
	<description>Quick and Dirty Web Development for Web 2.0: CakePHP, Prototype, JQuery, and lots more.</description>
	<lastBuildDate>Sat, 06 Mar 2010 13:23:33 -0600</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Chris</title>
		<link>http://www.webdevelopment2.com/cakephp-auth-component-tutorial-3/comment-page-2/#comment-28396</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Tue, 09 Feb 2010 14:02:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.webdevelopment2.com/?p=293#comment-28396</guid>
		<description>I think I am correct in saying this :-

&quot;And all I need to do is sniff your cookie and you secure access is all mine&quot;

Using any of these methods would allow a captured &quot;Remember Me&quot; cookie to be used to access the supposed secure system.

And I am fairly sure a cookie is easy to capture (sniff), and it wont matter that its encrypted because I dont need to decrypt it, just present it.

If I am wrong, please feel free to set me right, seriously, please do.</description>
		<content:encoded><![CDATA[<p>I think I am correct in saying this :-</p>
<p>&#8220;And all I need to do is sniff your cookie and you secure access is all mine&#8221;</p>
<p>Using any of these methods would allow a captured &#8220;Remember Me&#8221; cookie to be used to access the supposed secure system.</p>
<p>And I am fairly sure a cookie is easy to capture (sniff), and it wont matter that its encrypted because I dont need to decrypt it, just present it.</p>
<p>If I am wrong, please feel free to set me right, seriously, please do.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dani Berg</title>
		<link>http://www.webdevelopment2.com/cakephp-auth-component-tutorial-3/comment-page-2/#comment-28037</link>
		<dc:creator>Dani Berg</dc:creator>
		<pubDate>Wed, 28 Oct 2009 07:05:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.webdevelopment2.com/?p=293#comment-28037</guid>
		<description>Good article. Just one note though. 

&quot;This login() function is run every time a user accesses a page that needs authentication (I think)&quot;. 

This is not true.

You can use the User::login method to just add the user cookie in case authentication succeeds and the user asks to be remembered. 

Then use AppController::beforeFilter to try to authenticate the user based on the user cookie information in case Auth-&gt;user() is null.</description>
		<content:encoded><![CDATA[<p>Good article. Just one note though. </p>
<p>&#8220;This login() function is run every time a user accesses a page that needs authentication (I think)&#8221;. </p>
<p>This is not true.</p>
<p>You can use the User::login method to just add the user cookie in case authentication succeeds and the user asks to be remembered. </p>
<p>Then use AppController::beforeFilter to try to authenticate the user based on the user cookie information in case Auth-&gt;user() is null.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adventures in Japanese Programming &#187; CakePHP and RememberMe &#8212; AutoLogins for the soul</title>
		<link>http://www.webdevelopment2.com/cakephp-auth-component-tutorial-3/comment-page-2/#comment-27959</link>
		<dc:creator>Adventures in Japanese Programming &#187; CakePHP and RememberMe &#8212; AutoLogins for the soul</dc:creator>
		<pubDate>Mon, 14 Sep 2009 07:37:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.webdevelopment2.com/?p=293#comment-27959</guid>
		<description>[...] it&#8217;s small, lightweight and doesn&#8217;t take much configuring. (And don&#8217;t believe the page that comes up when you enter &#8220;CakePHP rememberme&#8221; into google. That&#8217;s what got me off on the wrong [...]</description>
		<content:encoded><![CDATA[<p>[...] it&#8217;s small, lightweight and doesn&#8217;t take much configuring. (And don&#8217;t believe the page that comes up when you enter &#8220;CakePHP rememberme&#8221; into google. That&#8217;s what got me off on the wrong [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Davide</title>
		<link>http://www.webdevelopment2.com/cakephp-auth-component-tutorial-3/comment-page-2/#comment-27931</link>
		<dc:creator>Davide</dc:creator>
		<pubDate>Tue, 04 Aug 2009 15:40:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.webdevelopment2.com/?p=293#comment-27931</guid>
		<description>Perfect, clear and simple, and it did the job in 5 mins. Thanks!</description>
		<content:encoded><![CDATA[<p>Perfect, clear and simple, and it did the job in 5 mins. Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bookmarks for Saturday, February 28th &#8212; Trevor Fitzgerald</title>
		<link>http://www.webdevelopment2.com/cakephp-auth-component-tutorial-3/comment-page-2/#comment-27850</link>
		<dc:creator>Bookmarks for Saturday, February 28th &#8212; Trevor Fitzgerald</dc:creator>
		<pubDate>Sat, 28 Feb 2009 16:02:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.webdevelopment2.com/?p=293#comment-27850</guid>
		<description>[...] CakePHP Auth Component - Tutorial Three: Remember Me Cookie [...]</description>
		<content:encoded><![CDATA[<p>[...] CakePHP Auth Component &#8211; Tutorial Three: Remember Me Cookie [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: myltik</title>
		<link>http://www.webdevelopment2.com/cakephp-auth-component-tutorial-3/comment-page-2/#comment-27846</link>
		<dc:creator>myltik</dc:creator>
		<pubDate>Sun, 15 Feb 2009 16:07:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.webdevelopment2.com/?p=293#comment-27846</guid>
		<description>Good article. Helped me a lot :-) Thanks.</description>
		<content:encoded><![CDATA[<p>Good article. Helped me a lot <img src='http://www.webdevelopment2.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: myltik</title>
		<link>http://www.webdevelopment2.com/cakephp-auth-component-tutorial-3/comment-page-2/#comment-27845</link>
		<dc:creator>myltik</dc:creator>
		<pubDate>Sun, 15 Feb 2009 16:05:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.webdevelopment2.com/?p=293#comment-27845</guid>
		<description>Good article. Helped me a lot :-) Thanks.

&lt;abbr&gt;&lt;em&gt;myltik’s last blog post..&lt;a href=&quot;http://chupakabr.ru/2009/02/%D1%81%D1%82%D0%B8%D1%85%D0%BE%D1%82%D0%B2%D0%BE%D1%80%D0%B5%D0%BD%D0%B8%D0%B5-%D0%BA%D1%82%D0%BE%D0%B1%D1%8B%D0%B1%D0%BB%D1%8F%D0%B4%D1%8C/#comment-132&quot; rel=&quot;nofollow&quot;&gt;??????????? ?? ????????????? - ?????????? ?? MIKArom&lt;/a&gt;&lt;/abbr&gt;&lt;/em&gt;</description>
		<content:encoded><![CDATA[<p>Good article. Helped me a lot <img src='http://www.webdevelopment2.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  Thanks.</p>
<p><abbr><em>myltik’s last blog post..<a href="http://chupakabr.ru/2009/02/%D1%81%D1%82%D0%B8%D1%85%D0%BE%D1%82%D0%B2%D0%BE%D1%80%D0%B5%D0%BD%D0%B8%D0%B5-%D0%BA%D1%82%D0%BE%D0%B1%D1%8B%D0%B1%D0%BB%D1%8F%D0%B4%D1%8C/#comment-132" rel="nofollow">??????????? ?? ????????????? &#8211; ?????????? ?? MIKArom</a></em></abbr></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Feras</title>
		<link>http://www.webdevelopment2.com/cakephp-auth-component-tutorial-3/comment-page-2/#comment-27834</link>
		<dc:creator>Feras</dc:creator>
		<pubDate>Tue, 27 Jan 2009 17:44:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.webdevelopment2.com/?p=293#comment-27834</guid>
		<description>Thanks for the gr8 article. Very helpful.

One observation though, it seems that $this-&gt;redirect($this-&gt;Auth-&gt;logout()); doesnt log the user out of all open windows.

Say a user has an authentic site open in more than one window, if you log out from one, the others remain logged in!

Is there a work around this?
Or am I doing something wrong?</description>
		<content:encoded><![CDATA[<p>Thanks for the gr8 article. Very helpful.</p>
<p>One observation though, it seems that $this-&gt;redirect($this-&gt;Auth-&gt;logout()); doesnt log the user out of all open windows.</p>
<p>Say a user has an authentic site open in more than one window, if you log out from one, the others remain logged in!</p>
<p>Is there a work around this?<br />
Or am I doing something wrong?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Computing Posts From Across The Web Part II : KillerCodingNinjaBunny</title>
		<link>http://www.webdevelopment2.com/cakephp-auth-component-tutorial-3/comment-page-2/#comment-27829</link>
		<dc:creator>Computing Posts From Across The Web Part II : KillerCodingNinjaBunny</dc:creator>
		<pubDate>Tue, 20 Jan 2009 14:35:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.webdevelopment2.com/?p=293#comment-27829</guid>
		<description>[...] Will You Remember Me Tomorrow? - A tutorial on CakePHP login forms, focussing on the &#8216;remember me&#8217; function. [...]</description>
		<content:encoded><![CDATA[<p>[...] Will You Remember Me Tomorrow? &#8211; A tutorial on CakePHP login forms, focussing on the &#8216;remember me&#8217; function. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Baz L</title>
		<link>http://www.webdevelopment2.com/cakephp-auth-component-tutorial-3/comment-page-1/#comment-27533</link>
		<dc:creator>Baz L</dc:creator>
		<pubDate>Thu, 19 Jun 2008 20:48:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.webdevelopment2.com/?p=293#comment-27533</guid>
		<description>@Pj Hile:
Make sure $this-&gt;authRedirect = false in your beforeFilter().
The line you mentioned is in Auth::identify() which is called from Auth::login().

And if you&#039;re using the code above right, Auth shouldn&#039;t be running this function on it&#039;s own.</description>
		<content:encoded><![CDATA[<p>@Pj Hile:<br />
Make sure $this->authRedirect = false in your beforeFilter().<br />
The line you mentioned is in Auth::identify() which is called from Auth::login().</p>
<p>And if you&#8217;re using the code above right, Auth shouldn&#8217;t be running this function on it&#8217;s own.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: PJ Hile</title>
		<link>http://www.webdevelopment2.com/cakephp-auth-component-tutorial-3/comment-page-1/#comment-27532</link>
		<dc:creator>PJ Hile</dc:creator>
		<pubDate>Thu, 19 Jun 2008 20:16:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.webdevelopment2.com/?p=293#comment-27532</guid>
		<description>I&#039;ve been trying to implement a &#039;remember me&#039; option similar to this, but it seems that $this-&gt;data[&#039;User&#039;][&#039;password&#039;] is getting unset before my login() function, so I had to use $_REQUEST[&#039;data&#039;][&#039;User&#039;][&#039;password&#039;].  Looks like the culprit may be &quot;unset($data[$this-&gt;userModel][$this-&gt;fields[&#039;password&#039;]]);&quot; on line 777 of the Auth component?</description>
		<content:encoded><![CDATA[<p>I&#8217;ve been trying to implement a &#8216;remember me&#8217; option similar to this, but it seems that $this-&gt;data['User']['password'] is getting unset before my login() function, so I had to use $_REQUEST['data']['User']['password'].  Looks like the culprit may be &#8220;unset($data[$this-&gt;userModel][$this-&gt;fields['password']]);&#8221; on line 777 of the Auth component?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Inflo.us</title>
		<link>http://www.webdevelopment2.com/cakephp-auth-component-tutorial-3/comment-page-1/#comment-27518</link>
		<dc:creator>Inflo.us</dc:creator>
		<pubDate>Tue, 03 Jun 2008 21:31:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.webdevelopment2.com/?p=293#comment-27518</guid>
		<description>The best alternative I&#039;ve been able to come up with is to give each user a long, randomly generated magic token. This token is tied neither to the user/pass or to the users id, so it&#039;s impossible to guess (brute force is another matter). It also can be changed at any time (definitely on password change and on logout).</description>
		<content:encoded><![CDATA[<p>The best alternative I&#8217;ve been able to come up with is to give each user a long, randomly generated magic token. This token is tied neither to the user/pass or to the users id, so it&#8217;s impossible to guess (brute force is another matter). It also can be changed at any time (definitely on password change and on logout).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Baz L</title>
		<link>http://www.webdevelopment2.com/cakephp-auth-component-tutorial-3/comment-page-1/#comment-27517</link>
		<dc:creator>Baz L</dc:creator>
		<pubDate>Mon, 02 Jun 2008 19:46:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.webdevelopment2.com/?p=293#comment-27517</guid>
		<description>What kind of variant? I&#039;m interested.</description>
		<content:encoded><![CDATA[<p>What kind of variant? I&#8217;m interested.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Graham Weldon</title>
		<link>http://www.webdevelopment2.com/cakephp-auth-component-tutorial-3/comment-page-1/#comment-27514</link>
		<dc:creator>Graham Weldon</dc:creator>
		<pubDate>Mon, 02 Jun 2008 06:34:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.webdevelopment2.com/?p=293#comment-27514</guid>
		<description>Excellent post. Very useful. I&#039;m now using a variant of this on a couple of sites.</description>
		<content:encoded><![CDATA[<p>Excellent post. Very useful. I&#8217;m now using a variant of this on a couple of sites.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Baz L</title>
		<link>http://www.webdevelopment2.com/cakephp-auth-component-tutorial-3/comment-page-1/#comment-27499</link>
		<dc:creator>Baz L</dc:creator>
		<pubDate>Mon, 12 May 2008 17:02:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.webdevelopment2.com/?p=293#comment-27499</guid>
		<description>@pjosephson: Excellent catch!

If statement needs to be modified: if (!empty($this-&gt;data) &amp;&amp; $this-&gt;data[&#039;User&#039;][&#039;remember_me&#039;]) {

ThanX!</description>
		<content:encoded><![CDATA[<p>@pjosephson: Excellent catch!</p>
<p>If statement needs to be modified: if (!empty($this->data) &#038;&#038; $this->data['User']['remember_me']) {</p>
<p>ThanX!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pjosephson</title>
		<link>http://www.webdevelopment2.com/cakephp-auth-component-tutorial-3/comment-page-1/#comment-27497</link>
		<dc:creator>pjosephson</dc:creator>
		<pubDate>Sat, 10 May 2008 14:16:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.webdevelopment2.com/?p=293#comment-27497</guid>
		<description>Where do you assume the value of the  remember checkbox?  It just seems that because you have data that you always assume the checkbox has been checked or am I missing something?</description>
		<content:encoded><![CDATA[<p>Where do you assume the value of the  remember checkbox?  It just seems that because you have data that you always assume the checkbox has been checked or am I missing something?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gauravanim</title>
		<link>http://www.webdevelopment2.com/cakephp-auth-component-tutorial-3/comment-page-1/#comment-27476</link>
		<dc:creator>gauravanim</dc:creator>
		<pubDate>Mon, 14 Apr 2008 16:16:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.webdevelopment2.com/?p=293#comment-27476</guid>
		<description>Yes i remember you :P
will try it soon
added to my bulk of BOOKh markss.Bookmarks i mean</description>
		<content:encoded><![CDATA[<p>Yes i remember you <img src='http://www.webdevelopment2.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /><br />
will try it soon<br />
added to my bulk of BOOKh markss.Bookmarks i mean</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Baz L</title>
		<link>http://www.webdevelopment2.com/cakephp-auth-component-tutorial-3/comment-page-1/#comment-27470</link>
		<dc:creator>Baz L</dc:creator>
		<pubDate>Wed, 09 Apr 2008 17:06:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.webdevelopment2.com/?p=293#comment-27470</guid>
		<description>That&#039;s interesting. We&#039;d still need to write the cookie in the login() function, but you&#039;re saying pull the forced login out into app_controller? Interesting.</description>
		<content:encoded><![CDATA[<p>That&#8217;s interesting. We&#8217;d still need to write the cookie in the login() function, but you&#8217;re saying pull the forced login out into app_controller? Interesting.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jelmer</title>
		<link>http://www.webdevelopment2.com/cakephp-auth-component-tutorial-3/comment-page-1/#comment-27469</link>
		<dc:creator>Jelmer</dc:creator>
		<pubDate>Wed, 09 Apr 2008 14:04:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.webdevelopment2.com/?p=293#comment-27469</guid>
		<description>Good article, I&#039;ve also made this sort of remember me cookie in a slightly different way. One thing that bothers me a bit is this:
&quot;This login() function is run every time a user accesses a page that needs authentication&quot; 

Often you want to display user information (welcome back, username) on a page that doesn&#039;t need authentication, like your home page, but that won&#039;t work anymore because the cookie isn&#039;t checked right.. 

Of course there&#039;s a solution, this is what works for me at least, some code in app_controller.php&#039;s beforeFilter function: 
		$cookie = $this-&gt;Cookie-&gt;read(&#039;Auth.User&#039;);
		if (!is_null($cookie))
		{
			if ($this-&gt;Auth-&gt;login($cookie))
			{
			$this-&gt;Session-&gt;del(&#039;Message.auth&#039;);
			}
		}</description>
		<content:encoded><![CDATA[<p>Good article, I&#8217;ve also made this sort of remember me cookie in a slightly different way. One thing that bothers me a bit is this:<br />
&#8220;This login() function is run every time a user accesses a page that needs authentication&#8221; </p>
<p>Often you want to display user information (welcome back, username) on a page that doesn&#8217;t need authentication, like your home page, but that won&#8217;t work anymore because the cookie isn&#8217;t checked right.. </p>
<p>Of course there&#8217;s a solution, this is what works for me at least, some code in app_controller.php&#8217;s beforeFilter function:<br />
		$cookie = $this-&gt;Cookie-&gt;read(&#8216;Auth.User&#8217;);<br />
		if (!is_null($cookie))<br />
		{<br />
			if ($this-&gt;Auth-&gt;login($cookie))<br />
			{<br />
			$this-&gt;Session-&gt;del(&#8216;Message.auth&#8217;);<br />
			}<br />
		}</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic page generated in 0.659 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2010-03-10 06:50:56 -->
<!-- Compression = gzip -->