PHPackages                             izub/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. izub/oauth2-provider

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

izub/oauth2-provider
====================

ZF3 OAuth2 Provider module

3.0.0(3y ago)0789MITPHPPHP ^8.1

Since Dec 26Pushed 3y ago1 watchersCompare

[ Source](https://github.com/izub/OAuth2Provider)[ Packagist](https://packagist.org/packages/izub/oauth2-provider)[ Docs](https://github.com/izub/OAuth2Provider)[ RSS](/packages/izub-oauth2-provider/feed)WikiDiscussions develop Synced 2d ago

READMEChangelog (2)Dependencies (14)Versions (7)Used By (0)

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

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

master:[![Build Status](https://camo.githubusercontent.com/69b95a6d6fe0734e7cd59efcc9cbec0765bba53d1bb404816816538af38b0e58/68747470733a2f2f7472617669732d63692e6f72672f697a75622f4f417574683250726f76696465722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/izub/OAuth2Provider)develop:[![Build Status](https://camo.githubusercontent.com/5cd6d2e0d1cad6d81b378e6c1ec39e4a9fde4714809e2fea2f0bf8f53c3021f0/68747470733a2f2f7472617669732d63692e6f72672f697a75622f4f417574683250726f76696465722e7376673f6272616e63683d646576656c6f70)](https://travis-ci.org/izub/OAuth2Provider)

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

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

[](#installation)

1. Easiest is through composer.

    ```
    php composer.phar require izub/oauth2-provider
    ```

    or in composer.json

    ```
    "require": {
        "izub/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\*`

```
