PHPackages                             franz-deleon/fdl-oauth2-provider - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. franz-deleon/fdl-oauth2-provider

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

franz-deleon/fdl-oauth2-provider
================================

ZF2 OAuth2 Provider module

v1.1(12y ago)166.8k4[1 issues](https://github.com/franz-deleon/OAuth2Provider/issues)MITPHPPHP &gt;=5.3.9

Since Dec 26Pushed 10y ago6 watchersCompare

[ Source](https://github.com/franz-deleon/OAuth2Provider)[ Packagist](https://packagist.org/packages/franz-deleon/fdl-oauth2-provider)[ Docs](https://github.com/franz-deleon/OAuth2Provider)[ RSS](/packages/franz-deleon-fdl-oauth2-provider/feed)WikiDiscussions develop Synced yesterday

READMEChangelogDependencies (7)Versions (4)Used By (0)

OAuth 2 Provider Module for Zend Framework 2
============================================

[](#oauth-2-provider-module-for-zend-framework-2)

master:[![Build Status](https://camo.githubusercontent.com/5b750c15a71db7cce9156842c7ddb79ba9306968abcd4ba36b64afc48884c1d4/68747470733a2f2f7472617669732d63692e6f72672f6672616e7a2d64656c656f6e2f4f417574683250726f76696465722e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/franz-deleon/OAuth2Provider)develop:[![Build Status](https://camo.githubusercontent.com/ed21ed95f56c4f5ed84f172678dfcd0e50997dd1ff6700d2f931974aaf9d2ae0/68747470733a2f2f7472617669732d63692e6f72672f6672616e7a2d64656c656f6e2f4f417574683250726f76696465722e706e673f6272616e63683d646576656c6f70)](https://travis-ci.org/franz-deleon/OAuth2Provider)

OAuth2Provider module integrates Brent Shaffer's [OAuth2 Server](https://github.com/bshaffer/oauth2-server-php) with Zend Framework 2 easily.

Installation
------------

[](#installation)

1. Easiest is through composer.

    ```
    php composer.phar require franz-deleon/fdl-oauth2-provider
    ```

    or in composer.json

    ```
    "require": {
        "franz-deleon/fdl-oauth2-provider": "dev-master"
    }

    ```

    then run `composer update`
2. Setup your configuration

    - Create 'oauth2provider' config key in your application's module.config.php
    - Copy the contents from OAuth2Provider/config/module.config.php.dist or rename this file to module.config.php if you dont have an existing module.config.php. If copying, make sure to copy only the data inside the 'oauth2provider' config key.
    - Fill up the configuration with your own settings. Refer to Configuration Options for documentation below.
3. Define the main\_server

    - Under the `oauth2provider` config key should be a `main_server` configuration.
    - Fill the `main_server` key with the custom server name you defined from step 2. The main\_server will use the name `default` as the default name for a server key.

        Example:

        ```
        array(
            'oauth2provider' => array(
                'servers' => array(
                    'MyUniqueServerName' => array([...])
                ),
                'main_server' => 'MyUniqueServerName', //  array(
            'OAuth2Provider',
        ),
        [...]
    ```

Configuration Options
---------------------

[](#configuration-options)

You can also view the configuration documentation in `configs/oauth2provider.config.php`. Each configuration section has its own config options that can be viewed separately in `OAuth2Provider\Options\*`

```
