<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>
<channel>
	<title>LiquidFoot &#187; authentication</title>
	<atom:link href="http://www.liquidfoot.com/tag/authentication/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.liquidfoot.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Mon, 02 Jan 2012 22:56:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>CakePHP Authentication</title>
		<link>http://www.liquidfoot.com/2008/09/12/cakephp-authentication/</link>
		<comments>http://www.liquidfoot.com/2008/09/12/cakephp-authentication/#comments</comments>
		<pubDate>Fri, 12 Sep 2008 19:47:18 +0000</pubDate>
		<dc:creator>Wayne</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[authentication]]></category>
		<category><![CDATA[cakephp]]></category>
		<category><![CDATA[php]]></category>
		<guid isPermaLink="false">http://www.liquidfoot.com/?p=81</guid>
		<description><![CDATA[I found some great tutorials on implementing ACL authentication in CakePHP. However, for the longest time I couldn&#8217;t get the actual example code to work. The way to authenticate everything in your application is to create an app_controller.php file in your app folder (see Preparing to Add Auth). In every other controller I&#8217;ve created in [...]]]></description>
			<content:encoded><![CDATA[<p>I found some great tutorials on implementing ACL authentication in CakePHP. However, for the longest time I couldn&#8217;t get the actual example code to work. The way to authenticate everything in your application is to create an app_controller.php file in your app folder (see <a href="http://book.cakephp.org/view/643/Preparing-to-Add-Auth">Preparing to Add Auth</a>). In every other controller I&#8217;ve created in CakePHP, you follow this convention:</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php
class FooBarsController extends AppController {
var $name = 'FooBars';
}
?&gt;
</pre>
<p>I followed the same convention (didn&#8217;t read the docs very closely) and just got all kinds of errors. After digging a bit deeper, turns out AppController extends Controller&#8230;apparently it can&#8217;t extend itself <img src='http://www.liquidfoot.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Hopefully this&#8217;ll save some time for someone, but the full controller for the example in the cookbook for the app_controller.php is this:</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php
class AppController extends Controller {
var $components = array('Auth', 'Acl');
function beforeFilter() {
//Configure AuthComponent
$this-&gt;Auth-&gt;authorize = 'actions';
$this-&gt;Auth-&gt;loginAction = array('controller' =&gt; 'users', 'action' =&gt; 'login');
$this-&gt;Auth-&gt;logoutRedirect = array('controller' =&gt; 'users', 'action' =&gt; 'login');
$this-&gt;Auth-&gt;loginRedirect = array('controller' =&gt; 'posts', 'action' =&gt; 'add');
}
}
?&gt;</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.liquidfoot.com/2008/09/12/cakephp-authentication/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

