1. Go to this page and download the library: Download tiao2/php-tools 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/ */
tiao2 / php-tools example snippets
use PhpTools\SSO\AuthenticatorInterface;
class MyAuthenticator implements AuthenticatorInterface
{
public function authenticate(string $username, string $password): ?int
{
// Query database, verify password
// Return user ID or null
}
}