Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,12 @@ use Nette\Security as NS;
class MyAuthenticator implements NS\IAuthenticator
{
public $database;
public $passwords;

function __construct(Nette\Database\Connection $database)
function __construct(Nette\Database\Connection $database, NS\Passwords $passwords)
{
$this->database = $database;
$this->passwords = $password;
}

function authenticate(array $credentials)
Expand All @@ -139,7 +141,7 @@ class MyAuthenticator implements NS\IAuthenticator
throw new NS\AuthenticationException('User not found.');
}

if (!NS\Passwords::verify($password, $row->password)) {
if (!$passwords->verify($password, $row->password)) {
throw new NS\AuthenticationException('Invalid password.');
}

Expand Down