Download the PHP package garbuzivan/laravel-auth-api without Composer

On this page you can find all versions of the php package garbuzivan/laravel-auth-api. 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 laravel-auth-api

Laravel Auth Api - библиотека для получения и генерации токена различными методами

Установка

composer require garbuzivan/laravel-auth-api

и опубликовать конфигурацию

php artisan vendor:publish --force --provider="GarbuzIvan\LaravelAuthApi\LaravelAuthApiServiceProvider" --tag="config"

config/app.php в блок 'providers' => []

GarbuzIvan\LaravelAuthApi\LaravelAuthApiServiceProvider::class,

.env

Функция отправки сообщений на EMAIL использует настройки .env Laravel блок MAIL

Особенности

Пакет использует систему очередей Laravel, пример запуска на исполнение :

php artisan queue:work

Тестировалось с настройками .env

QUEUE_CONNECTION=database

Пример использования

        $LaravelAuthApi = new LaravelAuthApi();
        $result = $LaravelAuthApi->auth(request()->all());
        if (!$result->isSuccess()) {
            return $this->sendError($result->getError(), 403);
        }
        $status = $result->getStatus();
        // Если $status = null ожидаем Token
        if(is_null($status)){
            return $this->sendJson(['token' => $result->getToken()]);
        }
        // если статус массив, ожидаем получение данных с заполнением параметров у которых значение false
        return $this->sendJson($status);

Конфигурация пакета

pipes - массив классов от AbstractPipes с различными методами получения токена

new_token_after_auth - если false то при авторизации, в случае ранее созданного токена, новый не будет генерироваться, а вернется старый

length_token - длина нового токена

code_email - правила генерации одноразового пароля отправляемого на email. charset - массив возможных символов, length - длина пароля.

view_mail - view шаблон для отправки письма с одноразовым паролем на email

SMS настройки

Реализовано с помощью пакета https://github.com/artem-prozorov/data-locker


All versions of laravel-auth-api with dependencies

PHP Build Version
Package Version
Requires zebrains/laravel-data-verificator Version ^0.1.1
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 garbuzivan/laravel-auth-api contains the following files

Loading the files please wait ....