Script
Less than 1 minute
Script
class Script implements \Hazaar\Warlock\Server\Interface\AuthenticatorImplements: Hazaar\Warlock\Server\Interface\Authenticator
Properties
scriptPath
private string $scriptPathType: string
Methods
__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): boolReturns: bool
Parameters
| Parameter | Type | Description |
|---|---|---|
$username | string | |
$password | string | |
$client | Hazaar\Warlock\Server\Client |
exists
public exists(string $username): boolReturns: bool
Parameters
| Parameter | Type | Description |
|---|---|---|
$username | string |
addUser
Add a new user with the specified password.
public addUser(string $username, string $password): boolReturns: bool
Parameters
| 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): boolReturns: bool
Parameters
| Parameter | Type | Description |
|---|---|---|
$username | string | the username of the user to remove |
listUsers
List all existing users.
public listUsers(): arrayReturns: array
Generated by Hazaar API Doc Generator on Fri, 04 Sep 2026 23:32:17 +0000