定制 phroute/authentic 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

phroute/authentic

最新稳定版本:v0.9.0

Composer 安装命令:

composer require phroute/authentic

包简介

README 文档

README

Build Status Coverage Status

Authentic is a simple, framwork agnostic authentication library, designed to be flexible and easy to integrate with any PHP project.

use Phroute\Authentic\Authenticator;

/**
 * Your application user repository
 * Implements:
 *    public function findById($id);
 *    public function findByLogin($login);
 *    public function registerUser(array $userDetails);
 */
$userRepository = new UserRepository();

$auth = new Authenticator($userRepository);
use Phroute\Authentic\Exception\AuthenticationException;

$credentials = array(
    'email'     => 'email@example.com',
    'password'  => 'pa55w0rd'
);

$rememberMe = true;

try
{
   $auth->authenticate($credentials, $rememberMe);
}catch(AuthenticationException $e)
{
  return false; // Nope...
}

// Aaaaand we're in...
return true;

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Unknown
  • 更新时间: 2015-01-04