O'Reilly logo

Zend Framework 2 Cookbook by Josephus Callaars

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Setting up a simple database Authentication

After seeing all the authentication methods available, it is time to see how it will actually work when we have a database authentication in place. This recipe will explain all the ins and outs of this specific method.

Getting ready

A working Zend Framework 2 skeleton application with the PHP sqlite extension loaded and enabled.

How to do it…

Database authentication can very well be the most widely used authentication method there is. In this recipe we will set up our own database authentication.

Setting up the module initialization

We will create our database as soon as possible after initialization of the modules, so we will attach it to an event called route or MvcEvent::EVENT_ROUTE. As a template for the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required