承接 wbc/auth-redux 相关项目开发

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

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

wbc/auth-redux

Composer 安装命令:

composer require wbc/auth-redux

包简介

A drop in modern replacement for most existing PEAR Auth configurations.

README 文档

README

A modern drop in replacement for PEAR/Auth that covers most of the original public API. But can also be used separately for any simple authentication needs.

Example usage

// Optionally globally define the legacy PEAR\Auth constants
// like AUTH_WRONG_LOGIN if they're used in your code.
WBC\Auth\LegacyPEARAuth::defineLegacyConstants();

$redux = new WBC\Auth\Redux(
    // Choose a storage that looks up your users, often a database.
    new WBC\Auth\Storage\PDO($db),
    // Choose a hashing layer, several are available.
    new WBC\Auth\Hashing\Standard(),
    // Choose a session layer to store the currently logged in user.
    new WBC\Auth\Session\Standard()
);

// Finally we just wrap $redux in a compatibility layer
// that emulates PEAR/Auth
$auth = new WBC\Auth\LegacyPEARAuth($redux, 'your_login_function');

// You can now just continue to use your existing code that relies
// on PEAR/Auth

More examples are available in the examples directory.

Features not implemented

FeatureStatusReason
Idle and Expiry timersNot implementedNot implemented.
setExpire(), setIdle() and sessionValidThru()Not ImplementedIdle and expiry timers not implemented.
"Advanced security" checksNot ImplementedNot implemented.
setAdvancedSecurity()Not ImplementedAdvanced security checks not implemented.
log() and attachLogObserver()Outside scopeLogging is outside of scope for this Authentication class.
removeUser(), addUser() and listUsers()Outside scopeRemoving, adding and listing of users is outside of scope for this Authentication class.
setSessionName()DeprecatedNot relevant, the Session layer replaces this.
setAuth()DeprecatedCan't see a good reason for manually setting logged in username.
deleteAuthData()DeprecatedCan't see a good reason for deleting session data.
staticCheckAuth()DeprecatedCan't see a good reason to bake-in static access the Auth class

Differences

  • Calling getAuthData() with no arguments returns an array of all the "auth data" available for the current user. However unlike PEAR\Auth, the username field will also be included in this array.

Customisation

You can write your own Storage, Hashing and Session layer by implementing the respective StorageInterface, HashingInterface and SessionInterface interfaces in your own classes.

License

This project is licensed under the MIT License - see the LICENSE file for details

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-06-02

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固