Auth/Adapter/Db.php

Show: inherited
Table of Contents

\Conjoon_Auth_Adapter_Db

Package: Conjoon\Model

Adapter for checking for authentication credentials in a database.

Parent(s)
?\Zend_Auth_Adapter_Interface
Author
Thorsten Suckow-Homberg  
Category
Model  
Uses
\Zend_Auth_Adapter_Interface  

Properties

Propertyprivate  $password= ''
Details
Type
n/a
Propertyprivate  $userName= ''
Details
Type
n/a

Methods

methodpublic__construct( string $userName, string $password ) : void

Constructor.

Parameters
Name Type Description
$userName string

The username to lookup in the database.

$password string

The password to lookup in the database.

methodpublicauthenticate( ) : \Zend_Auth_Result

This emthod will authenticate a user against a database table.

It will also generate a login token that is generated during the login process and will be stored in the db table. The token should then be written into the session - before dispatching any request, it is advised to check whether the session stored token still equals to the token stored in the database - if not, it is likely that another login occured with this user credentials. We assume that the controller set the default adapter for all database operations, thus is available without futher specifying it.

Returns
Type Description
\Zend_Auth_Result
Throws
Exception Description
\Zend_Auth_Adapter_Exception
Documentation was generated by DocBlox 0.18.1.