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.
11 lines
178 B
PHP
11 lines
178 B
PHP
<?php
|
|
|
|
namespace App\Auth;
|
|
|
|
class RandomTokenGenerator implements TokenGenerator
|
|
{
|
|
public function generate(): string
|
|
{
|
|
return bin2hex(random_bytes(32));
|
|
}
|
|
}
|