Download the PHP package laizerox/php-wowemu-auth without Composer
On this page you can find all versions of the php package laizerox/php-wowemu-auth. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download laizerox/php-wowemu-auth
More information about laizerox/php-wowemu-auth
Files in laizerox/php-wowemu-auth
Package php-wowemu-auth
Short Description Wowemu compliant SRP6 auth implementation
License GPL-3.0-or-later
Informations about the package php-wowemu-auth
php-wowemu-auth
Requirements
- PHP 8.2 - 8.5
- PHP
bcmathextension - phpseclib 3.0.57 or newer in the 3.x series (installed by Composer)
- Web server (ex. Apache or Nginx)
- CMaNGOS instance
Installation
You can install the libary via composer:
Migrating from phpseclib 2
This library now requires phpseclib ^3.0.57 to exclude versions flagged by
GHSA-q97c-8qh3-fpc6.
Methods that accept or return big integers now use phpseclib3\Math\BigInteger
instead of phpseclib\Math\BigInteger. Update imports and type declarations in
callers or subclasses that use those methods. The Laizerox\Wowemu\SRP class
names, salt/verifier strings, and SRP calculations remain the same.
Usage
Register
First you'll want to use Composer's autoloader. Place this at the top of your script.
Next you'll need to create the verifier and salt values using the username and password which your user submitted on your registration form.
Once that is generated you'll just insert those values into the database to the v and s fields.
Login
First you'll want to use Composer's autoloader. Place this at the top of your script.
Next you'll need to generate your "verifier". Think of this as the hashed version of the password your user put into the password field of you login form.
Next you'll want to compare that value with the value stored in your CMaNGOS realmd.account table. You can see below for more of an example.
Examples
Register
This example goes over how a user can register via a web form.
Now you'll obviously want to do some error checking and validation, but we'll leave that up to you.
The above is a very basic HTML form for user registrations.
Login
Again, you'll want to add in your own error checking and validation but this should get you started.
The above is a very basic HTML form for user logins.
If you find any defects when using the library please open a new issue in this repository. If you need further assistance we can try assising you in the #offtopic channel of the CMaNGOS Discord server.