Zend\Authentication\Validator\Authentication provides the ability to utilize a validator for an InputFilter in the instance of a Form or for single use where you simply want a true/false value and being able to introspect the error.
The available configuration options include:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | use Zend\Authentication\AuthenticationService;
use Zend\Authentication\Validator\Authentication as AuthenticationValidator;
$service = new AuthenticationService();
$adapter = new My\Authentication\Adapter();
$validator = new AuthenticationValidator(
'service' => $service,
'adapter' => $adapter,
);
$validator->setCredential('myCredentialContext');
$validator->isValid('myIdentity', array(
'myCredentialContext' => 'myCredential',
));
|
The source code of this file is hosted on GitHub. Everyone can update and fix errors in this document with few clicks - no downloads needed.