Download the PHP package uzzal/apitoken without Composer

On this page you can find all versions of the php package uzzal/apitoken. 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 apitoken

apitoken

API access token to be used in support with uzzal/acl library

Installation

Configuration

If you are using laravel 5.5+ then this library supports auto discovery. To configure manually just edit the config/app.php and add service provider like below.

At the app\Http\Kernel.php add this middleware

Database Migration

This library depends on a database table called auth_tokens, and it comes with a migration. So you need to run the migration to add that table with a artisan command like

Route

Suppose your want to create a api url for the FaqController like this http://YOUR-HOST/api/v1/faq then, in your route/api.php file add your routes like the below

Alternatively, Just in case if you don't have a dedicated route/api.php file in that case in your default route file add the route as below:

Now you are all set, but one thing is you need a _token to access the protected url. and you will get the _token once you are logged in. So we need a AuthController to login for the API. Here is a sample AuthController under the Api namespace in the app/Http/Controllers directory.

Controller

NOTE: This Auth controller should be publicly accessable and NOT protected with auth middleware just like this (in your route/api.php)

or

How it works: If the user sends a POST request to this AuthController with email and password it will response with a _token (like this $2y$10$/rUWXPY56sMsyYM6YNfEWea5IPO0xXeETDrAT0SS4dShk24H/fiZ6) then you can use that _token to access any protected url like this http://YOUR-HOST/api/v1/faq?_token=$2y$10$/rUWXPY56sMsyYM6YNfEWea5IPO0xXeETDrAT0SS4dShk24H/fiZ6

NOTE: You can pass the token via header, and in that case if you are to send the _token via header, in that case use token instead of _token as the header key.


All versions of apitoken with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.4
laravel/framework Version >=5.3.0
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 uzzal/apitoken contains the following files

Loading the files please wait ....