承接 horde/auth 相关项目开发

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

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

horde/auth

Composer 安装命令:

composer require horde/auth

包简介

Authentication and user management library

README 文档

README

Authentication and user management library for the Horde framework.

Provides a clean, interface-based architecture for credential validation, transparent authentication, user directory queries, user lifecycle management, and password operations across multiple backends.

New in this version

The main interface has been split into several capability oriented interface. Drivers no longer pseudo implement capabilities they don't really have but only expose those interfaces they really provide, i.e. certificate authentication does no longer provide an interface to list users or change passwords. Authentication results are now objects instead of booleans.

Installation

composer require horde/auth

Interfaces

Interface Purpose
CredentialProvider Validate credentials (username + password)
TransparentProvider Assert identity from HTTP request context
UserDirectory Check existence, list, and search users
UserLifecycleManager Add, remove, rename, and update users
PasswordManager Change and reset passwords
AccessPolicy Pre/post-auth hooks for lockout, expiration, rate limiting
LoginAttemptTracker Count and reset failed login attempts
LockManager Lock/unlock user accounts

Available drivers

Sql, Customsql, Ldap, Passwd, WritablePasswd, Ftp, Http, Radius, Pam, Peclsasl, Smb, Smbclient, Login, Shibboleth, X509, Ipbasic, Auto, Mock

Quick example

use Horde\Auth\AuthResultSuccess;
use Horde\Auth\Policy\CompoundPolicy;
use Horde\Auth\Policy\LockoutPolicy;
use Horde\Auth\Sql;
use Horde\Auth\Storage\InMemoryAttemptTracker;
use Horde\Auth\Storage\InMemoryLockManager;

$auth = new Sql(db: $db, encryption: 'crypt-blowfish');
$policy = new CompoundPolicy(
    new LockoutPolicy(new InMemoryAttemptTracker(), new InMemoryLockManager()),
);

$decision = $policy->preAuth('alice');
if (!$decision->isDenied()) {
    $result = $auth->validate('alice', ['password' => 'secret']);
    $decision = $policy->postAuth('alice', $result);
}

Documentation

License

LGPL-2.1 - see LICENSE.

统计信息

  • 总下载量: 3.91k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 4
  • 依赖项目数: 26
  • 推荐数: 2

GitHub 信息

  • Stars: 1
  • Watchers: 5
  • Forks: 6
  • 开发语言: PHP

其他信息

  • 授权协议: LGPL-2.1-only
  • 更新时间: 2023-10-25

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固