Zend\Authentication

16 important questions on Zend\Authentication

What is the purpose of Zend\Authentication?

Zend\Authentication provides an API for authentication and includes concrete authentication adapters for common scenarios.

Provide a loose definition of authentication?

The process of determining whether an entity is what is purports to be (identification), based on some set of credentials.

What is the main access point (FQCN) for Zend\Authentication?

Zend\Authentication\AuthenticationService
  • Higher grades + faster learning
  • Never study anything twice
  • 100% sure, 100% understanding
Discover Study Smart

Which interface is implemented by all authentication adapters?

Zend\Authentication\Adapter\AdapterInterface

What class is returned by an authentication adapter when authenticate() is called?

Zend\Authentication\Result

What exception interface should be thrown when an authentication adapter throws an exception?

Zend\Authentication\Adapter\Exception\ExceptionInterface

What are the four methods provided by a Zend\Authentication\Result instance?

Result::isValid()
Result::getCode()
Result::getIdentity()
Result::getMessages()

What are the six available result codes for Zend\Authentication\Result?

Result::SUCCESS
Result::FAILURE
Result::FAILURE_IDENTITY_NOT_FOUND
Result::FAILURE_IDENTITY_AMBIGUOUS
Result::FAILURE_CREDENTIALS_INVALID
Result::FAILURE_UNCATEGORIZED

What is the default persistent storage of Zend\Authentication?

PHP Sessions

What is done with the identity when a storage with low priority in an authentication chain storage returns the identity?

The identity is also stored in storages with a higher priority

What four methods are contracted by Zend\Authentication\Storage\StorageInterface?

StorageInterface::isEmpty()
StorageInterface::read()
StorageInterface::write($contents)
StorageInterface::clear()

What method is used to check for an identity and what method to forget the identity?

AuthenticationService::hasIdentity()
AuthenticationService::clearIdentity()

What validator provides authentication validator functionality?

Zend\Authentication\Validator\Authentication

What are the four options for the authentication validator?

1. adapter
2. identity
3. credential
4. service

What are the four required parameters for digest authentication?

1. filename
2. realm
3. username
4. password

What is returned as identity by the Digest Authentication adapter?

An array containing realm and username

The question on the page originate from the summary of the following study material:

  • A unique study and practice tool
  • Never study anything twice again
  • Get the grades you hope for
  • 100% sure, 100% understanding
Remember faster, study better. Scientifically proven.
Trustpilot Logo