承接 tigo/login-session 相关项目开发

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

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

tigo/login-session

Composer 安装命令:

composer require tigo/login-session

包简介

login using the session feature

关键字:

README 文档

README

Creating session for login in PHP

  • MIT license. Feel free to use this project. Leave a star ⭐ !
  • Download package: composer require tigo/login-session

If you found this project useful, consider making a donation to support the developer.

paypal | paypal

Introduction

Somewhere in your project, you may need to use autoload

include __DIR__ ."/vendor/autoload.php";

Example

  • Configuration:
 In the src/config/Standard.php directory
  • In the Standard class there is a method called postLogin(), it is through it that you will implement your logic.
  • By default the postLogin() method has an implemented logic which receives data from an array, to perform post validation
// the function must return a boolean value.
public function postLogin() 
{
       $user = isset($_POST[self::USER]) ? $_POST[self::USER] : false;
       $pw =   isset($_POST[self::PW]) ? md5($_POST[self::PW]) : false; 
       $table = TestMatrix::table();
       foreach ($table as $key => $item) {

            if($user == $item->user && $pw == $item->password){
               $_SESSION[self::SESSION] = $_POST[self::USER];
               return true;
            }
       }
       return false;
  }

Method TestMatrix::table()

  public static function table() 
  {
      return [
          1=> (object) ["user"=>"admin","password"=>md5("123")],
          2=> (object) ["user"=>"admin2","password"=>md5("1234")],
          3=> (object) ["user"=>"admin3","password"=>md5("12345")]
      ];
  }

Example methods

use Tigo\LoginSession\Login; // import class
$login = new Login();
$login->validate();
Method Description
validate() This method is responsible for validating the login.
auth() On a private page where the user must be logged in, you can use this method in the page controller or on the page itself.
logout() Use this method to destroy session or logout.
user() Use this method to collect session information.

Problems

If you discover any issues, please contact my email or issue tracker and post the details.

Contributors

License

MIT license. See the archive License

tigo/login-session 适用场景与选型建议

tigo/login-session 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 2 次下载、GitHub Stars 达 0, 最近一次更新时间为 2021 年 08 月 02 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「login」 「session」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 tigo/login-session 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 tigo/login-session 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-08-02