Skip to content

php authentification without database and temp files

License

Notifications You must be signed in to change notification settings

benizz0/phpNoDB

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

FOSSA Status

phpNoDB

FOSSA Status

Simple php authentification without database and temp files it's based with 1 password, no username.

When use it

if you whant to secure you webpage with password and you cant or no want use server storage / temp server storage

Requirements

you just need php 7

How it's work ?

im using TOTP for validate cookies

Installation and configure

  1. after download src/lib/ directory on your website, include lib/auth.php on your php webpage
<?php 
include 'lib/auth.php' 
?>
  1. generate password with php cli, open shell on any computer with cli php and generate new hashed password :
php -a
echo password_hash("<password>", PASSWORD_BCRYPT);
  1. Generate base64 256 byte key :

  2. Edit lib/auth.php for set the new password, base64 key and session time :

$basekey = "<base64 key>"; //base 64 256 byte

$password = '<hashed password>'; //password_hash("pass", PASSWORD_BCRYPT)
$time = <session time in seconde>; //session time

limitations

  • one password
  • session time not always correct
  • all user have same cookie if he connect on the same session period

License

FOSSA Status

About

php authentification without database and temp files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages