Download the PHP package falco442/slim-token-auth-mvc without Composer

On this page you can find all versions of the php package falco442/slim-token-auth-mvc. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package slim-token-auth-mvc

Note: this application is under development

Slim Framework 3 with Token Authentication

use this application (derived from the slim/slim-skeleton) to develop a REST json api application with token based authentication

Install the Application

Run this command from the directory in which you want to install your new application.

composer create-project falco442/slim-token-auth-mvc [app-name]

To run the application in development, you can also run this command.

composer start

Run this command to run the test suite

composer test

Configuration

Database configuration

This application uses the Illuminate\Database\Capsule\Manager (see api) provided with Laravel as ORM.

You can config the DB in the src/settings.php for the connection. The connection provider is already configured in src/dependencies.php.

CORS

In order to make the application able to accept CORS (Cross Origin Site Request), I added the Tuupola cors-middleware. It's already configured in the file src/middleware.php.

Settings

Modify the settings.php file to make application work:

Use

Controllers

This application is alreaady configured with a base Controller class, to work as a little MVC. See the file src/Controller/UsersController.php as an example.

Login

To to the login of the user, place a route in routes.php like this (I'm using UsersController as example)

and so the action login of the UsersController will be invoked. Use the authenticate() method of the class TokenAuth, as this

Pass in the body of the request the login fields, as you set in the settings array

and the authenticate method will return a user array if user exists, and false otherwise. If everything was OK, TokenAuth will refresh token and the field token_created


All versions of slim-token-auth-mvc with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.0
slim/slim Version ^3.1
slim/php-view Version ^2.0
monolog/monolog Version ^1.17
illuminate/database Version ~5.1
tuupola/cors-middleware Version ^0.5.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package falco442/slim-token-auth-mvc contains the following files

Loading the files please wait ....