| 1 | <?php |
||
| 9 | class Authentication |
||
| 10 | { |
||
| 11 | const URL_LOGIN = '/api/login'; |
||
| 12 | const URL_REGISTER = '/api/register'; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @var Transport |
||
| 16 | */ |
||
| 17 | private $transport; |
||
| 18 | |||
| 19 | public function __construct(Transport $transport) |
||
| 23 | |||
| 24 | public function authenticate(Credentials $credentials): Token |
||
| 38 | |||
| 39 | public function register(string $username, string $email, string $password): bool |
||
| 55 | } |