Domain: User, Session, EmailAddress, DTOs, repositories, services (PasswordHasher, TokenGenerator, Clock). Config: PHP-DI container definitions and Slim routes. Entry point: public/index.php with slim-bridge.
16 lines
335 B
PHP
16 lines
335 B
PHP
<?php
|
|
|
|
namespace App\Auth;
|
|
|
|
class BcryptPasswordHasher implements PasswordHasher
|
|
{
|
|
public function hash(string $password): string
|
|
{
|
|
return password_hash($password, PASSWORD_DEFAULT);
|
|
}
|
|
|
|
public function verify(string $password, string $hash): bool
|
|
{
|
|
return password_verify($password, $hash);
|
|
}
|
|
}
|