bgallagher / bgoauthprovider

ZF2 OAuth 1.0a 提供者模块

0.1.6 2013-05-28 08:38 UTC

This package is not auto-updated.

Last update: 2024-09-28 12:51:53 UTC


README

一个 ZF2 OAuth 1.0a 提供者模块(WIP)

此模块允许您的 ZF2 应用程序充当 OAuth 1.0a 提供者,使您可以使用 OAuth 保护您的 API 端点。

它仍然是一个 WIP,任何反馈或拉取请求都非常欢迎。

要求

ZF2 模块

Pecl 扩展

## 安装

  1. 将模块添加到您的 composer.json 需求中。

    "require": {
        "bgallagher/bgoauthprovider": "dev-master"
    }
  2. composer.phar update

  3. 将 "BgOauthProvider" 添加到您的 application.config.php 文件中。

配置示例

<?php

return array(

    'bgoauthprovider' => array(
        'disable_layout_on_authorisation_page' => true,

        'acl_config' => array(
            array('routeName' => 'api/endpoint', 'role' => '3l', 'method' => array('post')),
            array('routeName' => 'api/endpoint/another', 'role' => '2l', 'method' => array('delete')),
        ),
    ),

);