axy/htpasswd-cli 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

axy/htpasswd-cli

Composer 安装命令:

composer require axy/htpasswd-cli

包简介

Htpasswd CLI utility

关键字:

README 文档

README

Documentation in Russian.

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 -c has 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 -n can be used together with -D and -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 我们能提供哪些服务?
定制开发 / 二次开发

基于 axy/htpasswd-cli 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-12-03