承接 bhujel/secret-header 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

bhujel/secret-header

Composer 安装命令:

composer require bhujel/secret-header

包简介

Package for create api secret key and bind api for authenticated access

README 文档

README

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

Installation of the package

  • Run the below command to install package
composer require bhujel/secret-header

Package will install inside your laravel application.

- Run the below command to copy config file inside config
  php artisan vendor:publish --tag=api-accessor

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
  php artisan migrate

-Now run the command to publish assets and check for environment variable for the application .env

  php artisan install:api_accessor

-Now your package is ready you can visit access dashboard using your {your app url}/dashboard/accessor

   {your app url}/dashboard/accessor

Access Key list is below url

   {your app url}/dashboard/access_keys

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.
  1. Add one api key with active status.
  2. From api_processor.php file inside your config dir of application has predefined keys for package. Default api access key header is
API-ACCESS-KEY 

but recomanded to setup your custom key name.

Copy and add paste your api key to your key name header.

3. default it will resposes html on failed to access api you can manage response from handler.php file. 4. If the api key is valid and accessible then you are now able to play on your apis.

统计信息

  • 总下载量: 56
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 1
  • 开发语言: CSS

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-02-09

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固