PHPackages                             alb/oauth2-server-bundle - 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. alb/oauth2-server-bundle

AbandonedSymfony-bundle[Authentication &amp; Authorization](/categories/authentication)

alb/oauth2-server-bundle
========================

Symfony2 OAuth2 server bundle

1.3.1.x-dev(9y ago)39MITPHPPHP &gt;=5.3.3

Since Dec 15Pushed 9y ago1 watchersCompare

[ Source](https://github.com/arnaud-lb/AlbOAuth2ServerBundle)[ Packagist](https://packagist.org/packages/alb/oauth2-server-bundle)[ Docs](http://friendsofsymfony.github.com)[ RSS](/packages/alb-oauth2-server-bundle/feed)WikiDiscussions master Synced 1mo ago

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

AlbOAuth2ServerBundle
=====================

[](#alboauth2serverbundle)

[![Build Status](https://camo.githubusercontent.com/288f33451a492c71e19daeb51c0278494f637d3d53123cd392bb091e981d16be/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f61726e6175642d6c622f416c624f417574683253657276657242756e646c652e706e67)](https://camo.githubusercontent.com/288f33451a492c71e19daeb51c0278494f637d3d53123cd392bb091e981d16be/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f61726e6175642d6c622f416c624f417574683253657276657242756e646c652e706e67)

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

[](#installation)

Installation is a quick 6 step process:

1. Download AlbOAuth2ServerBundle
2. Configure the Autoloader
3. Enable the Bundle
4. Create your User class
5. Configure your application's security.yml
6. Configure the AlbOAuth2ServerBundle

### Step 1: Download AlbOAuth2ServerBundle and oauth2-php

[](#step-1-download-alboauth2serverbundle-and-oauth2-php)

Ultimately, the AlbOAuth2ServerBundle files should be downloaded to the `vendor/bundles/Alb/OAuth2ServerBundle` directory and the oauth2-php files to the `vendor/oauth2-php` directory.

This can be done in several ways, depending on your preference. The first method is the standard Symfony2 method.

**Using the vendors script**

Add the following lines in your `deps` file:

```
[AlbOAuth2ServerBundle]
    git=git://github.com/arnaud-lb/AlbOAuth2ServerBundle.git
    target=bundles/Alb/OAuth2ServerBundle
[oauth2-php]
    git=git://github.com/arnaud-lb/oauth2-php.git

```

Now, run the vendors script to download the bundle:

```
$ php bin/vendors install
```

**Using submodules**

If you prefer instead to use git submodules, then run the following:

```
$ git submodule add git://github.com/arnaud-lb/AlbOAuth2ServerBundle.git vendor/bundles/Alb/OAuth2ServerBundle
$ git submodule add git://github.com/arnaud-lb/oauth2-php.git vendor/oauth2-php
$ git submodule update --init
```

### Step 2: Configure the Autoloader

[](#step-2-configure-the-autoloader)

Add the `Alb` and `OAuth2` namespaces to your autoloader:

```
