2017 © Pedro Peláez
 

library slim-user-middleware

Simple, basic, User Middleware for Slim Framework. Includes route login middleware.

image

tylerjuniorcollege/slim-user-middleware

Simple, basic, User Middleware for Slim Framework. Includes route login middleware.

  • Wednesday, January 6, 2016
  • by duanejeffers
  • Repository
  • 2 Watchers
  • 2 Stars
  • 6 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Simple User Middleware for Slim Framework

This package is a no-nonsense, simple User/Login Middleware for Slim Framework 2.x., without the requirements for any thing like user permissions or roles., (*1)

This package consists of Two Slim Middleware objects, and a Route Middleware function for pages that require being logged in., (*2)

Setup

After including the package in to the "require" portion of the composer.json, you need to set the middleware using the add() function in the Slim Object., (*3)

    $app->add(new TJC\User\UserMiddleware());
    $app->add(new TJC\User\LoginMiddleware());

The order in which you add them really doesn't matter. The User Middleware's action all occur before the main application is called, and the Login Middleware actions write a before dispatch hook., (*4)

Dependency Injection Notes

Currently, user and login are being used by the package for keeping the user logged in and kicking the user out if they are not logged in. You can change these dependency variable names by setting the tjc.middleware.user and tjc.middleware.login in the App config during instanciation., (*5)

The Versions

06/01 2016

dev-master

9999999-dev

Simple, basic, User Middleware for Slim Framework. Includes route login middleware.

  Sources   Download

MIT

The Requires