1. Go to this page and download the library: Download zfcampus/zf-mvc-auth library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?phprequire_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
namespaceZF\MvcAuth\Authentication;
useZend\Http\Request;
useZend\Http\Response;
useZF\MvcAuth\Identity\IdentityInterface;
useZF\MvcAuth\MvcAuthEvent;
interfaceAdapterInterface{
/**
* @return array Array of types this adapter can handle.
*/publicfunctionprovides();
/**
* Attempt to match a requested authentication type
* against what the adapter provides.
*
* @param string $type
* @return bool
*/publicfunctionmatches($type);
/**
* Attempt to retrieve the authentication type based on the request.
*
* Allows an adapter to have custom logic for detecting if a request
* might be providing credentials it's interested in.
*
* @param Request $request
* @return false|string
*/publicfunctiongetTypeFromRequest(Request $request);
/**
* Perform pre-flight authentication operations.
*
* Use case would be for providing authentication challenge headers.
*
* @param Request $request
* @param Response $response
* @return void|Response
*/publicfunctionpreAuth(Request $request, Response $response);
/**
* Attempt to authenticate the current request.
*
* @param Request $request
* @param Response $response
* @param MvcAuthEvent $mvcAuthEvent
* @return false|IdentityInterface False on failure, IdentityInterface
* otherwise
*/publicfunctionauthenticate(Request $request, Response $response, MvcAuthEvent $mvcAuthEvent);
}