Download the PHP package elmyrockers/ezauth without Composer
On this page you can find all versions of the php package elmyrockers/ezauth. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download elmyrockers/ezauth
More information about elmyrockers/ezauth
Files in elmyrockers/ezauth
Package ezauth
Short Description EzAuth PHP library - Lightweight & easy authentication library with secure 'remember me' feature for PHP. With this, you just need to write a few lines of PHP code only in each pages.
License MIT
Informations about the package ezauth
EzAuth (Experimental)
Lightweight & easy authentication library with secure 'remember me' feature for PHP. With this, you just need to write a few lines of PHP code only in each pages.
Usage/Examples
1. Installation:
Install the EzAuth package using Composer:
2. bootstrap.php:
Create bootstrap.php
file. The complete code for this file should look like this:
3. Register Form:
Create a file named register_form.php
containing the following HTML form. This form includes Bootstrap 5 for styling (you can replace it with your preferred framework).
4. register.php:
Create a file named register.php
with the following code. It includes bootstrap.php
and retrieves flash messages and the CSRF token from the EzAuth
object before displaying the registration form.
You can now access register.php
in your web browser to see the registration form and submit registration data. Good luck!
Reference
Configurations:
- $config[ 'database' ]
- $config[ 'email' ]
- $config[ 'message' ]
- $config[ 'auth' ]
Methods:
- __construct( array $config )
- $csrfToken = csrfToken()
- $flash = flashMessage()
- list( $status, $flash, $csrfToken ) = register( $callback = null )
- list( $status, $flash ) = verifyEmail( $callback = null )
- list( $status, $flash, $csrfToken ) = login( $callback = null )
- list( $status, $flash, $csrfToken ) = recoverPassword( $callback = null )
- list( $status, $flash, $csrfToken ) = resetPassword( $callback = null )
- $user = memberArea( null|string|array $allowedRoles = null )
- $user = isLoggedIn()
- redirectLoggedInUser()
- logout()
Authors
License
All versions of ezauth with dependencies
phpmailer/phpmailer Version ^6.9
twig/twig Version ^3.10
gabordemooij/redbean Version ^5.7
firebase/php-jwt Version ^6.10
illuminate/validation Version ^11.20
illuminate/translation Version ^11.20
illuminate/support Version ^11.20
elmyrockers/ezflash Version ^1.0.1