2017 © Pedro Peláez
 

project project-auth

PHPixie authorization skeleton project

image

phpixie/project-auth

PHPixie authorization skeleton project

  • Friday, February 16, 2018
  • by dracony
  • Repository
  • 4 Watchers
  • 29 Stars
  • 406 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 10 Forks
  • 2 Open issues
  • 7 Versions
  • 4 % Grown

The README.md

Auth Project

This is a PHPixie project with some advanced user authentication already setup. It serves as a faster starting point making rolling out your own authorization easier., (*1)

Project Demo, (*2)

There are two separate authentication domains: users and admins, stored in different tables and entirely separated. This means you can login as a user and an admin at the same time. In fact admins can impersonate any user with a press of the button on their dashboard., (*3)

To run, first install the project:, (*4)

composer create-project phpixie/project-auth project

Then point your web server to the web/ folder. That's it, now just visit the site and you'll be greeted with a login/signup page. To try out the admin flow visit /admin/ and login as phpixie with password framework. You can also add your own admins by calling the addAdmin.php script from console:, (*5)

php addAdmin.php someUser somePassword

The project uses an SQLite database contained in database.sqlite. To recreate the same database in MySQL:, (*6)

CREATE TABLE `users` (
    `id` INTEGER AUTO_INCREMENT PRIMARY KEY,
    `email` VARCHAR(255) NOT NULL UNIQUE ,
    `passwordHash` VARCHAR(255) NOT NULL
);

CREATE TABLE `userTokens` (
  `series` varchar(50) NOT NULL,
  `userId` int(11) DEFAULT NULL,
  `challenge` varchar(50) DEFAULT NULL,
  `expires` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`series`)
);

CREATE TABLE `admins` (
    `id` INTEGER AUTO_INCREMENT PRIMARY KEY,
    `username` VARCHAR(255) NOT NULL UNIQUE ,
    `passwordHash` VARCHAR(255) NOT NULL
);

Remember to modify the assets/config/database.php file with the new settings., (*7)

The Versions

16/02 2018

dev-master

9999999-dev

PHPixie authorization skeleton project

  Sources   Download

BSD BSD-3-Clause

The Requires

 

The Development Requires

21/03 2016

3.2.3

3.2.3.0

PHPixie authorization skeleton project

  Sources   Download

BSD

The Requires

 

The Development Requires

21/03 2016

3.2.2

3.2.2.0

PHPixie authorization skeleton project

  Sources   Download

BSD

The Requires

 

The Development Requires

21/03 2016

3.2

3.2.0.0

PHPixie authorization skeleton project

  Sources   Download

BSD

The Requires

 

The Development Requires

21/03 2016

3.2.1

3.2.1.0

PHPixie authorization skeleton project

  Sources   Download

BSD

The Requires

 

The Development Requires

15/03 2016

3.1

3.1.0.0

PHPixie authorization skeleton project

  Sources   Download

BSD

The Requires

 

The Development Requires

14/03 2016

3.0

3.0.0.0

PHPixie authorization skeleton project

  Sources   Download

BSD

The Requires

 

The Development Requires