Script
Less than 1 minute
Script
class Script implements \Hazaar\Warlock\Server\Auth\AuthenticatorProperties
scriptPath
private string $scriptPathMethods
__construct
Script constructor.
public __construct(string $scriptPath): voidParameters
| Parameter | Type | Description |
|---|---|---|
$scriptPath | string | the path to the authentication script that will be executed for authentication |
authenticate
public authenticate(string $username, string $password, ?Client $client): boolParameters
| Parameter | Type | Description |
|---|---|---|
$username | string | |
$password | string | |
$client | Client |
exists
public exists(string $username): boolParameters
| Parameter | Type | Description |
|---|---|---|
$username | string |
addUser
Add a new user with the specified password.
public addUser(string $username, string $password): boolParameters
| Parameter | Type | Description |
|---|---|---|
$username | string | the username of the new user |
$password | string | the password for the new user |
removeUser
Remove an existing user.
public removeUser(string $username): boolParameters
| Parameter | Type | Description |
|---|---|---|
$username | string | the username of the user to remove |
listUsers
List all existing users.
public listUsers(): voidGenerated by Hazaar API Doc Generator on Fri, 05 Jun 2026 06:08:15 +0000