Zend\Authentication\Adapter\DbTable\CallbackCheckAdapter
Synopsis
class CallbackCheckAdapter
extends AbstractAdapter
{
- // members
- protected callable $credentialValidationCallback;
- // Inherited members from AbstractAdapter
- protected Adapter $zendDb;
- protected Select $dbSelect;
- protected string $tableName;
- protected string $identityColumn;
- protected string $credentialColumn;
- protected array $authenticateResultInfo;
- protected array $resultRow;
- protected bool $ambiguityIdentity;
- // Inherited members from AbstractAdapter
- protected mixed $credential;
- protected mixed $identity;
- // methods
- public void __construct()
- public DbTable setCredentialValidationCallback()
- protected Select authenticateCreateSelect()
- protected Result authenticateValidateResult()
- // Inherited methods from AbstractAdapter
- public void __construct()
- public DbTable setTableName()
- public DbTable setIdentityColumn()
- public DbTable setCredentialColumn()
- public DbTable setAmbiguityIdentity()
- public bool getAmbiguityIdentity()
- public Select getDbSelect()
- public stdClass|bool getResultRowObject()
- public Result authenticate()
- protected abstract Result authenticateValidateResult()
- protected abstract Select authenticateCreateSelect()
- protected bool authenticateSetup()
- protected array authenticateQuerySelect()
- protected Result authenticateValidateResultSet()
- protected Result authenticateCreateAuthResult()
- // Inherited methods from AbstractAdapter
- public mixed getCredential()
- public AbstractAdapter setCredential()
- public mixed getIdentity()
- public AbstractAdapter setIdentity()
Hierarchy
Members
protected
- $ambiguityIdentity
—
Zend\Authentication\Adapter\DbTable\bool
$ambiguityIdentity - Flag to indicate same Identity can be used with different credentials. Default is FALSE and need to be set to true to allow ambiguity usage. - $authenticateResultInfo
—
array
$authenticateResultInfo - $credential — mixed
- $credentialColumn
—
string
$credentialColumns - columns to be used as the credentials - $credentialValidationCallback
—
Zend\Authentication\Adapter\DbTable\callable
$credentialValidationCallback - This overrides the Treatment usage to provide a callback that allows for validation to happen in code - $dbSelect — Zend\Authentication\Adapter\DbTable\Sql\Select
- $identity — mixed
- $identityColumn
—
string
$identityColumn - the column to use as the identity - $resultRow
—
array
$resultRow - Results of database authentication query - $tableName
—
string
$tableName - the table name to check - $zendDb
—
Zend\Db\Adapter\Adapter
Database Connection
Methods
protected
- authenticateCreateSelect() — _authenticateCreateSelect() - This method creates a Zend\Db\Sql\Select object that is completely configured to be queried against the database.
- authenticateValidateResult() — _authenticateValidateResult() - This method attempts to validate that the record in the resultset is indeed a record that matched the identity provided to this adapter.
public
- __construct() — __construct() - Sets configuration options
- setCredentialValidationCallback() — setCredentialValidationCallback() - allows the developer to use a callback as a way of checking the credential.
Inherited from Zend\Authentication\Adapter\DbTable\AbstractAdapter
protected
- authenticateCreateAuthResult() — Creates a Zend\Authentication\Result object from the information that has been collected during the authenticate() attempt.
- authenticateCreateSelect() — _authenticateCreateSelect() - This method creates a Zend\Db\Sql\Select object that is completely configured to be queried against the database.
- authenticateQuerySelect() — _authenticateQuerySelect() - This method accepts a Zend\Db\Sql\Select object and performs a query against the database with that object.
- authenticateSetup() — _authenticateSetup() - This method abstracts the steps involved with making sure that this adapter was indeed setup properly with all required pieces of information.
- authenticateValidateResult() — _authenticateValidateResult() - This method attempts to validate that the record in the resultset is indeed a record that matched the identity provided to this adapter.
- authenticateValidateResultSet() — _authenticateValidateResultSet() - This method attempts to make certain that only one record was returned in the resultset
public
- authenticate() — This method is called to attempt an authentication. Previous to this call, this adapter would have already been configured with all necessary information to successfully connect to a database table and attempt to find a record matching the provided identity.
- 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() — getResultRowObject() - Returns the result row as a stdClass object
- setAmbiguityIdentity() — setAmbiguityIdentity() - sets a flag for usage of identical identities with unique credentials. It accepts integers (0, 1) or boolean (true, false) parameters. Default is false.
- setCredentialColumn() — setCredentialColumn() - set the column name to be used as the credential column
- setIdentityColumn() — setIdentityColumn() - set the column name to be used as the identity column
- setTableName() — setTableName() - set the table name to be used in the select query
Inherited from Zend\Authentication\Adapter\AbstractAdapter
public
- getCredential() — Returns the credential of the account being authenticated, or NULL if none is set.
- getIdentity() — Returns the identity of the account being authenticated, or NULL if none is set.
- setCredential() — Sets the credential for binding
- setIdentity() — Sets the identity for binding