PHP code example of nella / simple-hash-authenticator
1. Go to this page and download the library: Download nella/simple-hash-authenticator library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
nella / simple-hash-authenticator example snippets
$authenticator = new \Nella\SimpleHashAuthenticator\Authenticator(array(
'demo' => '$2y$10$l5cjVRLvK2mjm6hzj8.s8.yjXmtO0Eio0JNt.JwAbZccndN9m1IVi', // hash of 'test'
), array(
'demo' => array(
'admin'
),
));
/** @var \Nette\Security\User $user */
$user->setAuthenticator($authenticator);