Download the PHP package californiamountainsnake/longmantelegrambot-laravel-api-auth-system without Composer
On this page you can find all versions of the php package californiamountainsnake/longmantelegrambot-laravel-api-auth-system. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download californiamountainsnake/longmantelegrambot-laravel-api-auth-system
More information about californiamountainsnake/longmantelegrambot-laravel-api-auth-system
Files in californiamountainsnake/longmantelegrambot-laravel-api-auth-system
Package longmantelegrambot-laravel-api-auth-system
Short Description This is the laravel api auth system intended for the longman/telegram-bot
License MIT
Informations about the package longmantelegrambot-laravel-api-auth-system
longmantelegrambot-laravel-auth-system
This is the laravel api auth system intended for the longman/telegram-bot library. Important! This library uses the californiamountainsnake/simple-laravel-auth-system library, you must install and config one first.
Install:
Require this package with Composer
Install this package through Composer.
Edit your project's composer.json
file to require californiamountainsnake/longmantelegrambot-laravel-api-auth-system
:
and run composer update
or
run this command in your command line:
Usage:
- Extend the abstract classes
AuthTelegrambotUserEntity
andAuthTelegrambotUserRepository
. -
Include the
AuthBotAccessUtils
,AuthApiUtils
andAuthUserUtils
traits into your base Command class and realise the abstract methods. Set the correct return type hints in the phpdoc for the methodsgetUserEntity()
,getUserRole()
andgetUserAccountType()
. -
Call
$this->initTelegramParams()
,$this->reInitUserParams()
and then$this->assertUserHasAccessToMainRoute()
in thepreExecute()
method and handle the exceptions: -
Use AuthApiUtils's methods to execute queries to your laravel api:
- If you want, you can realise the ApiProxyInterface and process api queries as you prefer.
All versions of longmantelegrambot-laravel-api-auth-system with dependencies
myclabs/php-enum Version ~1.5
californiamountainsnake/json-response Version ~1.0.1
californiamountainsnake/php-utils Version ~1.0.1
californiamountainsnake/simple-laravel-auth-system Version ~3.0
californiamountainsnake/longmantelegrambot-utils Version ~1.1.3
longman/telegram-bot Version ~0.55