Skip to content

Rajat-Dabade/php_authentication

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP_authentication

This is the well secure project for authentication writen in php with SQL at backend.This project is fully based on the various framework (i.e Slim framework,illuminate/database framework).

First of all what you want to do is go to php_authentication folder and open cmd and fire the command:

php composer.phar update
make sure that you have set the environment variables for php

After completing this stuff the

"vendor"
folder will appear which will carry all the dependencies of the project.

Then go to :

vendor/slim
folder and search for the file
".htaccess"
and copy that file and paste it into the
"public"
folder.

Go to :

php_authentication/app/config/
folder and check the appropriate development and production file and configure it according to your configuration(The mode of the file is been decided in the
php_authentication/mode.php file)

Then the database part:

Fire the query into the database to create the users and users_permission table into the database :

CREATE TABLE `users` (
  `id` int(11) NOT NULL,
  `username` varchar(20) NOT NULL,
  `first_name` varchar(50) DEFAULT NULL,
  `last_name` varchar(50) DEFAULT NULL,
  `password` varchar(256) NOT NULL,
  `active` tinyint(1) NOT NULL,
  `active_hash` varchar(255) DEFAULT NULL,
  `recover_hash` varchar(255) DEFAULT NULL,
  `remember_identifier` varchar(255) DEFAULT NULL,
  `remember_token` varchar(255) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;



CREATE TABLE `users_permissions` (
  `id` int(11) NOT NULL,
  `user_id` int(11) DEFAULT NULL,
  `is_admin` tinyint(1) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages