Implementing Custom Authentication
Starting with version 2.9+, MyWebSQL allows you to create custom authentication routine to implement your own method of authenticating users. This maybe useful in scenarios where you need to perform some extra checks or entirely use a new method of authentication other than the ones provided with MyWebSQL.
To implement custom authentication, follow these simple steps.
- Edit auth.php file in the ‘config’ folder and set AUTH_TYPE constant to ‘CUSTOM’.
- Open the ‘lib/auth’ folder in explorer and copy the ‘custom.sample.php’ in the same folder with the name ‘custom.php’.
- Open ‘custom.php’ file in your favourite editor and make changes to the file to implement your authentication mechanism.
- Once you have saved the changes in the ‘custom.php’ file, open MyWebSQL in your browser and see if your new authentication implementation works.
The sample file provided contains enough comments and demo code to get your started easily. If you are still having problems, you can send a support request on the website.