adamlundrigan/ldc-zfc-user-oauth2

ZfcUser 的 OAuth2 服务器集成

1.0.0 2014-11-08 15:57 UTC

This package is not auto-updated.

Last update: 2024-09-24 03:28:36 UTC


README

是什么?

zf-oauth2 的一个扩展,允许使用 ZfcUser 作为身份验证来源

Latest Stable Version License Build Status Code Coverage Scrutinizer Code Quality

如何?

  1. 使用 Composer 安装模块

    composer require adamlundrigan/ldc-zfc-user-oauth2:<version>
    
  2. 在您的 application.config.php 文件中启用所需的模块

    • ZfcBase
    • ZfcUser
    • LdcZfcUserOAuth2
  3. 配置 ZfcUser

  4. 覆盖 zf-ouath2 配置以使用提供的存储提供者

     return array(
        'zf-oauth2' => array(
            'storage' => 'ldc-zfc-user-oauth2-storage-pdo', 
        ),
    );
    
  5. 覆盖 ZfcUser 使用的认证适配器。在您的 zfc-user.global.php 配置文件中找到 auth_adapters 键并将其替换为以下内容

    'auth_adapters' => array( 100 => 'ldc-zfc-user-oauth2-authentication-adapter-db' ),
    

待办事项

  • 在 OAuth2 服务器中使用 ZfcUser 的认证机制
  • 在 OAuth2 服务器认证成功时填充 ZfcUser 认证存储
  • 进行一些测试可能是个好主意
  • 一些文档和示例也可能是个好主意