axy/htpasswd-cli
Composer 安装命令:
composer require axy/htpasswd-cli
包简介
Htpasswd CLI utility
关键字:
README 文档
README
- GitHub: axypro/htpasswd-cli
- Composer: axy/htpasswd-cli
PHP 5.4+
Library does not require any dependencies (except composer packages).
Provides console utility axy-htpasswd that is analogue of Apache htpasswd utility.
Install (via composer):
$ composer global require axy/htpasswd-cli
The utility is stored in the directory .composer/vendor/bin.
If this directory has been added to $PATH you can use the utility from the command line:
$ axy-htpasswd -cb .password-file nick password
You can rename axy-htpasswd to htpasswd and use as usual.
Algorithms
axy-password supports all crypt algorithms of Apache 2.4 htpasswd:
- BCrypt
- MD5 (Apache version)
- SHA1
- CRYPT
- PLAIN TEXT
Interface
axy-password matches the interface of htpasswd:
Usage:
axy-htpasswd [-cimBdpsDv] [-C cost] passwordfile username
axy-htpasswd -b[cmBdpsDv] [-C cost] passwordfile username password
axy-htpasswd -n[imBdps] [-C cost] username
axy-htpasswd -nb[mBdps] [-C cost] username password
-c Create a new file. (no effect in the current version)
-n Don't update file; display results on stdout.
-b Use the password from the command line rather than prompting for it.
-i Read password from stdin without verification (for script usage).
-m Force MD5 encryption of the password (default).
-B Force bcrypt encryption of the password (very secure).
-C Set the computing time used for the bcrypt algorithm
(higher is more secure but slower, default: 5, valid: 4 to 31).
-d Force CRYPT encryption of the password (8 chars max, insecure).
-s Force SHA encryption of the password (insecure).
-p Do not encrypt the password (plaintext, insecure).
-D Delete the specified user.
-v Verify password for the specified user.
On other systems than Windows and NetWare the '-p' flag will probably not work.
The SHA algorithm does not use a salt and is less secure than the MD5 algorithm.
Differs:
- The option
-chas no effect. If the file exists then it will be changed. If not exist then will be created. - Many errors of options combination are ignored.
- The option
-ncan be used together with-Dand-v. It is analogue of an empty file, the user will not found.
Program API
For program API (PHP) see axypro/htpasswd.
axy/htpasswd-cli 适用场景与选型建议
axy/htpasswd-cli 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 311 次下载、GitHub Stars 达 0, 最近一次更新时间为 2015 年 12 月 03 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「htpasswd」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 axy/htpasswd-cli 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 axy/htpasswd-cli 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 axy/htpasswd-cli 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A lightweight - single class - library to read and write htpasswd. You can add or delete users or you can update their passwords...
This symfony user provider reads user from the htpasswd file.
Htpasswd helper, library - Basic, Simple and Lightweight
A module for Zend Framework 2 to manage an apache .htpasswd file for Basic Authentication.
A module that implements the acl with some presets. It can be attached to htGroupManager and htUserManager or customized for other situations
统计信息
- 总下载量: 311
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-12-03