Zend Framework  3.0
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
CredentialTreatmentAdapter Class Reference

Public Member Functions

 __construct (DbAdapter $zendDb, $tableName=null, $identityColumn=null, $credentialColumn=null, $credentialTreatment=null)
 __construct() - Sets configuration options
 
 setCredentialTreatment ($treatment)
 setCredentialTreatment() - allows the developer to pass a parametrized string that is used to transform or treat the input credential data.
 
- Public Member Functions inherited from AbstractAdapter
 __construct (DbAdapter $zendDb, $tableName=null, $identityColumn=null, $credentialColumn=null)
 __construct() - Sets configuration options
 
 setTableName ($tableName)
 setTableName() - set the table name to be used in the select query
 
 setIdentityColumn ($identityColumn)
 setIdentityColumn() - set the column name to be used as the identity column
 
 setCredentialColumn ($credentialColumn)
 setCredentialColumn() - set the column name to be used as the credential column
 
 setAmbiguityIdentity ($flag)
 setAmbiguityIdentity() - sets a flag for usage of identical identities with unique credentials.
 
 getAmbiguityIdentity ()
 getAmbiguityIdentity() - returns TRUE for usage of multiple identical identities with different credentials, FALSE if not used.
 
 getDbSelect ()
 getDbSelect() - Return the preauthentication Db Select object for userland select query modification
 
 getResultRowObject ($returnColumns=null, $omitColumns=null)
 getResultRowObject() - Returns the result row as a stdClass object
 
 authenticate ()
 This method is called to attempt an authentication.
 
- Public Member Functions inherited from AbstractAdapter
 getCredential ()
 Returns the credential of the account being authenticated, or NULL if none is set.
 
 setCredential ($credential)
 Sets the credential for binding.
 
 getIdentity ()
 Returns the identity of the account being authenticated, or NULL if none is set.
 
 setIdentity ($identity)
 Sets the identity for binding.
 

Protected Member Functions

 authenticateCreateSelect ()
 _authenticateCreateSelect() - This method creates a Zend object that is completely configured to be queried against the database.
 
 authenticateValidateResult ($resultIdentity)
 _authenticateValidateResult() - This method attempts to validate that the record in the resultset is indeed a record that matched the identity provided to this adapter.
 
- Protected Member Functions inherited from AbstractAdapter
 authenticateValidateResult ($resultIdentity)
 _authenticateValidateResult() - This method attempts to validate that the record in the resultset is indeed a record that matched the identity provided to this adapter.
 
 authenticateCreateSelect ()
 _authenticateCreateSelect() - This method creates a Zend object that is completely configured to be queried against the database.
 
 authenticateSetup ()
 _authenticateSetup() - This method abstracts the steps involved with making sure that this adapter was indeed setup properly with all required pieces of information.
 
 authenticateQuerySelect (Sql\Select $dbSelect)
 _authenticateQuerySelect() - This method accepts a Zend object and performs a query against the database with that object.
 
 authenticateValidateResultSet (array $resultIdentities)
 _authenticateValidateResultSet() - This method attempts to make certain that only one record was returned in the resultset
 
 authenticateCreateAuthResult ()
 Creates a Zend object from the information that has been collected during the authenticate() attempt.
 

Protected Attributes

 $credentialTreatment = null
 
- Protected Attributes inherited from AbstractAdapter
 $zendDb = null
 
 $dbSelect = null
 
 $tableName = null
 
 $identityColumn = null
 
 $credentialColumn = null
 
 $authenticateResultInfo = null
 
 $resultRow = null
 
 $ambiguityIdentity = false
 
- Protected Attributes inherited from AbstractAdapter
 $credential
 
 $identity
 

Constructor & Destructor Documentation

__construct ( DbAdapter  $zendDb,
  $tableName = null,
  $identityColumn = null,
  $credentialColumn = null,
  $credentialTreatment = null 
)

__construct() - Sets configuration options

Parameters
DbAdapter$zendDb
string$tableNameOptional
string$identityColumnOptional
string$credentialColumnOptional
string$credentialTreatmentOptional

Member Function Documentation

authenticateCreateSelect ( )
protected

_authenticateCreateSelect() - This method creates a Zend object that is completely configured to be queried against the database.

Returns
Sql
authenticateValidateResult (   $resultIdentity)
protected

_authenticateValidateResult() - This method attempts to validate that the record in the resultset is indeed a record that matched the identity provided to this adapter.

Parameters
array$resultIdentity
Returns
AuthenticationResult
setCredentialTreatment (   $treatment)

setCredentialTreatment() - allows the developer to pass a parametrized string that is used to transform or treat the input credential data.

In many cases, passwords and other sensitive data are encrypted, hashed, encoded, obscured, or otherwise treated through some function or algorithm. By specifying a parametrized treatment string with this method, a developer may apply arbitrary SQL upon input credential data.

Examples:

'PASSWORD(?)' 'MD5(?)'

Parameters
string$treatment
Returns
self Provides a fluent interface

Member Data Documentation

$credentialTreatment = null
protected