aurmil/slim3-skeleton-users

A Slim Framework 3 application skeleton with users authentication through Sentinel

dev-master 2019-01-15 15:19 UTC

This package is auto-updated.

Last update: 2024-04-16 03:15:36 UTC


README

⚠️ WORK IN PROGRESS 🚧

Slim 3 Skeleton with users authentication

What's included?

Installation and usage

I invite you to read first the short documentation I wrote for my app skeleton.

Required: PHP 7 and Composer

Run the following command, replacing [your-project-name] with the name of the folder you want to create.

composer create-project aurmil/slim3-skeleton-users [your-project-name]

.htaccess file, Web server choice, virtual host, AllowOverride All, var folder permissions... please refer to the main documentation.

Database:

  • Create a MySQL database, a user with permissions on it and put these informations in db.yaml configuration file
  • Execute the correct MySQL schema creation file that is in the vendor/cartalyst/sentinel/schema according to your MySQL version
  • Execute the SQL files that are in the sql folder

SwiftMailer and emails

Unlike in the main app skeleton, SwiftMailer usage is required and must be configured in swiftmailer.yaml configuration file.

Emails sent to users for account activation when creating a new account (if this option is active) or for password reset are HTML emails. HTML content of these emails is in templates/emails folder.

Users authentication

In security.yaml configuration file, you can enable or disable 2 options:

  • "remember me" checkbox on login form
  • email confirmation sending when creating a new account

Users access to routes is controlled by middlewares AllowOnlyGuests and AllowOnlyLoggedUsers applied to routes in routes.php.

To do

  • Unit tests (need help on this)
  • Password guidelines (length, strength, ...) => only length ? mb_strlen
  • UUID
    • Add UUID to users
    • Use them in URL like activate account and reset password
    • See this issue and the wiki
  • Back office
    • admin group, admin users
    • allow admin users to log in and manage groups + users
    • possible to log in on front office and back office separately at the same time?

License

The MIT License (MIT). Please see License File for more information.