Download the PHP package bhujel/secret-header without Composer
On this page you can find all versions of the php package bhujel/secret-header. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download bhujel/secret-header
More information about bhujel/secret-header
Files in bhujel/secret-header
Package secret-header
Short Description Package for create api secret key and bind api for authenticated access
License MIT
Informations about the package secret-header
Api-Accessor
Api Accessor is package to protect your application api for laravel.If you are developing your application it will helpful for you to extend your application.
Compatible for
Laravel Version | Version |
---|---|
8.* | 1.* |
License
The Laravel framework is open-sourced software licensed under the MIT license.
prerequisites
- Composer
- PHP 7.3 or 8.*
- MySql or Mongodb
- If mongodb database in application as primary database https://github.com/jenssegers/laravel-mongodb
- Laravel 8.*
- Laravel Helpers
Installation of the package
- Run the below command to install package
Package will install inside your laravel application.
- Run the below command to copy config file inside config
You can make changes of your database information and requirement for your application to apply for the package processing
- After successfully publishing vendor api_processor.php will appear in config file inside your root application.
- Api Processor assets file is auto generated inside your public directory.
- Now you need table to store api keys , run the below command to migrate the table, it will create access_keys and access_key_usages table in your database
-Now run the command to publish assets and check for environment variable for the application .env
-Now your package is ready you can visit access dashboard using your {your app url}/dashboard/accessor
Access Key list is below url
You can add TEST or LIVE API ACCESS keys and maintain your api if required.
Using in API
You can customize and use keys on your api request
- Add on your api header to access your api. Once the package is installed you can only able to access your api after adding and managing at least on api key.
- Add one api key with active status.
- From api_processor.php file inside your config dir of application has predefined keys for package. Default api access key header is
but recomanded to setup your custom key name.
Copy and add paste your api key to your key name header.
- default it will resposes html on failed to access api you can manage response from handler.php file.
- If the api key is valid and accessible then you are now able to play on your apis.