Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Sameer Borate:
Simple user authentication in Laravel 4
Jun 17, 2013 @ 14:22:01

Sameer Borate has a new post today showing how you can do simple user authentication in a Laravel 4-based application using the built-in Auth functionality.

With the recent release of Laravel 4, PHP developers have at their disposal one of the finest frameworks for application development. As with all new frameworks, it is always good to write some quick code to get a feel for the underlying architecture. The following post shows a simple authentication application using Laravel.

He walks you through the creation of the simple "users" table, the configuration the Auth class will need to connect and authenticate and the form for the login. He also shows the steps for the actual authentication process as well as the code for the routes to make it all work. Additionally, he shows how to restrict pages to only those with the "admin" level access via an auth filter. You can download the example code here.

tagged: user authentication laravel4 tutorial database auth admin

Link: http://www.codediesel.com/frameworks/simple-user-authentication-in-laravel-4

Sebastian Göttschkes:
symfony2: Testing secure pages
Oct 08, 2012 @ 13:13:19

Sebastian Göttschkes has a new post to his site showing you how to test secure pages within your Symfony2 applications using a simple "requestWithAuth" method.

If you develop a web application, more often than not you have some kind of user section or admin panel where some kind of login identifies the user and protects your actions against usage from unauthorized people. It can be difficult to do functional tests with this kind of pages as you need to simulate some session or cookie context. In this tutorial, I want to show you how to test your functional pages with symfony2 and phpunit.

He includes a "bad way" to do it, cheating by making a client and feeding it the HTTP auth credentials, and a more correct way involving the "requestWithAuth" method that's called whenever the "request" is called to push those credentials along with every request. Code for this basic function is included.

tagged: symfony2 testing unittest authentication http auth tutorial

Link:

Chris Hartjes' Blog:
Simple User Registration in CakePHP 1.2
Jan 10, 2008 @ 12:09:00

Chris Hartjes has posted a tutorial about the creation of a simple user registration system in an application developed in the CakePHP framework. In response to the popularity of his other article on using CakePHP's Auth component, he's created a bit of code to answer some questions.

People have been having some questions about how the password is hashed and questions about a user registration system. Of course, the snarky response is "go and read the source for Security::Hash() and create some of your own code", but it is easier to just give people some code so they stop asking.

His example code extends the User object for the model, makes a controller with a register() method call and creates the username/password form for the user the enter in their information.

tagged: user registration cakephp framework example auth component user registration cakephp framework example auth component

Link:

Chris Hartjes' Blog:
Simple User Registration in CakePHP 1.2
Jan 10, 2008 @ 12:09:00

Chris Hartjes has posted a tutorial about the creation of a simple user registration system in an application developed in the CakePHP framework. In response to the popularity of his other article on using CakePHP's Auth component, he's created a bit of code to answer some questions.

People have been having some questions about how the password is hashed and questions about a user registration system. Of course, the snarky response is "go and read the source for Security::Hash() and create some of your own code", but it is easier to just give people some code so they stop asking.

His example code extends the User object for the model, makes a controller with a register() method call and creates the username/password form for the user the enter in their information.

tagged: user registration cakephp framework example auth component user registration cakephp framework example auth component

Link:

SaniSoft Blog:
Bugs & enhancements for Auth component in CakePHP v1.2 - Part 1
Aug 03, 2007 @ 10:27:00

On the SaniSoft blog, there's a post pointing out a bugfix and a new enhancement to the Auth component for the CakePHP framework in version 1.2 (part 1):

The auth component is supposed to handle the user login in your app but I was just not able to get that done and there have been similar complaints in the CakePHP mailing list. Since I wanted it *NOW* I had no option but to once again dig into the source - but - hey it is not so bad, they give you the code so that you can change it! right?

His patch involves changing code in two places in the AuthComponent::startup() method to handle the login correctly.

tagged: cakephp framework auth component handle login cakephp framework auth component handle login

Link:

SaniSoft Blog:
Bugs & enhancements for Auth component in CakePHP v1.2 - Part 1
Aug 03, 2007 @ 10:27:00

On the SaniSoft blog, there's a post pointing out a bugfix and a new enhancement to the Auth component for the CakePHP framework in version 1.2 (part 1):

The auth component is supposed to handle the user login in your app but I was just not able to get that done and there have been similar complaints in the CakePHP mailing list. Since I wanted it *NOW* I had no option but to once again dig into the source - but - hey it is not so bad, they give you the code so that you can change it! right?

His patch involves changing code in two places in the AuthComponent::startup() method to handle the login correctly.

tagged: cakephp framework auth component handle login cakephp framework auth component handle login

Link:

WebReference.com:
Security Techniques: Part 2
May 29, 2007 @ 12:02:00

WebReference.com has posted part two in their series looking at security techniques in PHP. This time they focus on the use of a few things - the PECL filter, the PEAR Auth module and mcrypt.

For each of the three topics covered, they include a few code examples on their use - an HTML form with the filter extension, user authentication with the PEAR Auth, and encrypting data to be used in a more secure cookie.

The article is excerpted from PHP 5 Advanced: Visual QuickPro Guide by Larry Ullman.

tagged: security technique tutorial filter pecl pear auth mcrypt security technique tutorial filter pecl pear auth mcrypt

Link:

WebReference.com:
Security Techniques: Part 2
May 29, 2007 @ 12:02:00

WebReference.com has posted part two in their series looking at security techniques in PHP. This time they focus on the use of a few things - the PECL filter, the PEAR Auth module and mcrypt.

For each of the three topics covered, they include a few code examples on their use - an HTML form with the filter extension, user authentication with the PEAR Auth, and encrypting data to be used in a more secure cookie.

The article is excerpted from PHP 5 Advanced: Visual QuickPro Guide by Larry Ullman.

tagged: security technique tutorial filter pecl pear auth mcrypt security technique tutorial filter pecl pear auth mcrypt

Link:

Norbet Mocsnik's Blog:
Setting Up DokuWiki with Simple Authentication
Dec 19, 2006 @ 09:02:00

Norbet Mocsnik, having just set it up himself, is sharing the steps needed to get DokuWiki set up and working with a simple authentication system.

I promised to investigate the steps needed to set up DokuWiki with the simplest authentication scheme for a friend and I thought others might benefit from it too, so here it is.

There's about fifteen steps in all, including the download/install of the package and creating the basic functionality (like a simple Auth schema - he gives an example). Create the superuser and set up the desired restrictions and you're home free. If you want more information on authentication in DokuWiki, check out this page on the DokuWiki's wiki.

tagged: dokuwiki simple authentication guide steps auth scheme restrictions dokuwiki simple authentication guide steps auth scheme restrictions

Link:

Norbet Mocsnik's Blog:
Setting Up DokuWiki with Simple Authentication
Dec 19, 2006 @ 09:02:00

Norbet Mocsnik, having just set it up himself, is sharing the steps needed to get DokuWiki set up and working with a simple authentication system.

I promised to investigate the steps needed to set up DokuWiki with the simplest authentication scheme for a friend and I thought others might benefit from it too, so here it is.

There's about fifteen steps in all, including the download/install of the package and creating the basic functionality (like a simple Auth schema - he gives an example). Create the superuser and set up the desired restrictions and you're home free. If you want more information on authentication in DokuWiki, check out this page on the DokuWiki's wiki.

tagged: dokuwiki simple authentication guide steps auth scheme restrictions dokuwiki simple authentication guide steps auth scheme restrictions

Link: