devtoygun/laravel-masterkey
Composer 安装命令:
composer require devtoygun/laravel-masterkey
包简介
A master key package for laravel projects that bypasses session privileges.
README 文档
README
Laravel MasterKey is a lightweight utility designed for developers to maintain emergency access and bypass session-based privilege checks during development or maintenance phases. It provides a seamless way to authenticate as a super-admin using secure headers.
Key Features
- Header-Based Access: Authenticate instantly using a custom header.
- Global Gate Bypass: Automatically bypasses all
GateandPolicychecks for the master session. - Zero Configuration: Works out of the box with Laravel's auto-discovery.
- Stealth Mode: Minimal footprint in your application's route list or logs.
Installation
You can install the package via composer:
composer require devtoygun/laravel-masterkey
Usage
Add a new key named MASTER_KEY to your project's .ENV file.
The password you set for this key is your MASTER password.
After your project is completed, open any header editor tool and run it with these values:
Name: dev-master
Value: Your MASTER_KEY password in your ENV file.
After submitting the header, auth controls on the project will be bypassed and you will be considered logged in as admin.
!!!Attention!!!
By using this plugin you are assumed to be aware of:
- This is not a hacking tool or malicious software.
- This add-on is intended to log in with "developer" authority on the project during long-term technical support after project delivery.
- The user is responsible for using this plug-in for purposes other than its intended purpose; the plug-in developer cannot be held responsible for any data loss, legal liability or security vulnerabilities that may occur.
- Anyone using this plug-in must know and accept that this plug-in is publicly available and open source under the MIT license and that anyone can use it and access it by reverse engineering.
- Since this plugin is not malicious software or a hacking tool, there is no encryption or code obfuscation.
devtoygun/laravel-masterkey 适用场景与选型建议
devtoygun/laravel-masterkey 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 04 月 18 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 devtoygun/laravel-masterkey 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 devtoygun/laravel-masterkey 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 1
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 29
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-04-18