<?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>Scott Blaine &#187; redux</title>
	<atom:link href="http://scottblaine.com/tag/redux/feed" rel="self" type="application/rss+xml" />
	<link>http://scottblaine.com</link>
	<description>Omaha web developer</description>
	<lastBuildDate>Wed, 12 Oct 2011 01:00:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Authentication with CodeIgniter</title>
		<link>http://scottblaine.com/authentication-with-codeigniter</link>
		<comments>http://scottblaine.com/authentication-with-codeigniter#comments</comments>
		<pubDate>Sat, 30 May 2009 01:00:08 +0000</pubDate>
		<dc:creator>Scott</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[authentication]]></category>
		<category><![CDATA[codeigniter]]></category>
		<category><![CDATA[redux]]></category>

		<guid isPermaLink="false">http://scottblaine.com/?p=140</guid>
		<description><![CDATA[Having finished the registration process, I realized I needed some way to keep people logged in, let them log in, log out, retrieve their password, possibly have some kind of email validation, etc. All sorts of things. I started looking through the CodeIgniter user guide and about they closest things they have is the session [...]]]></description>
			<content:encoded><![CDATA[<p>Having finished the registration process, I realized I needed some way to keep people logged in, let them log in, log out, retrieve their password, possibly have some kind of email validation, etc. All sorts of things. I started looking through the CodeIgniter user guide and about they closest things they have is <a title="CodeIgniter's Session Class" href="http://codeigniter.com/user_guide/libraries/sessions.html">the session library</a>. While you could use it to track if a user is logged in, that&#8217;s about the extent of the value it would provide to you.</p>
<p>At first I looked for ways that I might be able to at least run checks on pages to see if a user is logged in or not. It turns out that&#8217;s not terribly difficult (once you figure out how to do it). You need to <a title="Authentication with CodeIgniter - David Winter" href="http://davidwinter.me.uk/articles/2009/02/21/authentication-with-codeigniter/">create your own authentication controller</a> for use with pages where you want to check if the user is logged in. Cool, that works. I could throw the log in/log out functionality in easily enough, but resetting passwords and validating email addresses would be a whole different matter.</p>
<p>That&#8217;s when I decided that I should start looking for a user-contributed authentication library. The CodeIgniter Wiki has <a title="CodeIgniter Authentication Libraries" href="http://codeigniter.com/wiki/Category:Contributions::Libraries::Authentication/">a nice list of them.</a> As I started looking through them and all their various features I realized I should come up with a list of the features that I needed to have. Here&#8217;s what I was looking for in a library:</p>
<ul>
<li>Good coding practices</li>
<li>Good documentation</li>
<li>Small number of files</li>
<li>Database implementation that&#8217;s not complex</li>
<li>Login using username or email address</li>
<li>Emails for lost passwords</li>
<li>Automatic login</li>
<li>Hashing of passwords</li>
<li>Maximum number of failed login attempts</li>
<li>Emails for activation (nice to have)</li>
<li>reCAPTCHA support (nice to have)</li>
</ul>
<p>Not too harsh, right? Unfortunately most of the libraries ended up being too large, too simple, or completely lacking in documentation. It was hard to find a library that fit somewhere in the middle. I did find one library that might meet all of my requirements, and if not, it&#8217;s awfully close: <a title="reduxauth" href="http://code.google.com/p/reduxauth/">Redux 2 (beta)</a>. It has all of the functionality I want, it doesn&#8217;t contain a crazy number of files, the database is simple and well thought out, there&#8217;s a complete sample application that makes use of the library, and more. I&#8217;m going to give it a try and comment in my next post on how well it works.</p>
<p>I should also mention in the course of my search I came across <a title="What Code Igniter authentication library is best? - Stack Overflow" href="http://stackoverflow.com/questions/346980/what-code-igniter-authentication-library-is-best">an excellent post on Stack Overflow regarding authentication libraries for CodeIgniter</a>. There&#8217;s a lot of great discussion on that page and Redux was also listed there as being one of the better solutions available.</p>
]]></content:encoded>
			<wfw:commentRss>http://scottblaine.com/authentication-with-codeigniter/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

