PHPackages                             benjam1/oauth-security-service-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. benjam1/oauth-security-service-provider

ActiveLibrary

benjam1/oauth-security-service-provider
=======================================

OAuth security service provider to use with the KnpOAuthBundle.

5161PHP

Since Feb 26Pushed 13y ago1 watchersCompare

[ Source](https://github.com/benja-M-1/OAuthSecurityServiceProvider)[ Packagist](https://packagist.org/packages/benjam1/oauth-security-service-provider)[ RSS](/packages/benjam1-oauth-security-service-provider/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

Silex OAuth authentication provider
===================================

[](#silex-oauth-authentication-provider)

This provider allows you to add an OAuth security authentication provider based on  to your Silex project.

Installation
============

[](#installation)

Use composer :

```
...
"require": {
    ...
    "benjam1/oauth-security-service-provider": "dev-master"
}

```

Then run `php composer.phar install`

Configuration
=============

[](#configuration)

KnpOAuthBundle rely on Buzz, so you first have to setup a buzz client:

```
$app['buzz.client.factory'] = $app->protect(function ($client) use ($app) {
    return $app->share(function () use ($client, $app) {
        $clients = array(
            'curl'      => '\Buzz\Client\Curl',
            'multicurl' => '\Buzz\Client\MultiCurl',
            'stream'    => '\Buzz\Client\FileGetContent',
        );

        if (false == isset($clients[$client])) {
            throw new \InvalidArgumentException(sprintf('The client "%s" does not exist, curl, multicurl and stream availables.', $client));
        }

        $client = $clients[$client];

        return new $client();
    });
});

$this['buzz.client'] = $app['buzz.client.factory']('curl');

```

You can use the silex Buzz extension of Marc instead:  but I didn't test it.

When Buzz is set up you can configure the security service:

```
    // app.php

    $app->register(new OAuthSecurityServiceProvider());

    $app['security.firewalls'] = array(
        'front' => array(
            'pattern' => '^.*',
            'oauth' => array(
                'oauth_provider'    => 'google',
                'infos_url'         => 'https://www.googleapis.com/oauth2/v1/userinfo',
                'username_path'     => 'email',
                'scope'             => 'https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email',
                'login_path'        => '/login',
                'check_path'        => '/login_check',
                'failure_path'      => '/',
                'client_id'         => 'yourclientid,
                'secret'            => 'yourapplicationsecret',
            ),
        ),
    );

```

Add your user provider (see  to do that) and you are done.

More information about Silex: .

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 85.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/d124ab99e6e09d1195ab30ed99425796ed03882049ca990886b8c1b41aafc3e4?d=identicon)[benjam1](/maintainers/benjam1)

---

Top Contributors

[![benja-M-1](https://avatars.githubusercontent.com/u/212269?v=4)](https://github.com/benja-M-1 "benja-M-1 (6 commits)")[![jrsmith](https://avatars.githubusercontent.com/u/130211?v=4)](https://github.com/jrsmith "jrsmith (1 commits)")

### Embed Badge

![Health badge](/badges/benjam1-oauth-security-service-provider/health.svg)

```
[![Health](https://phpackages.com/badges/benjam1-oauth-security-service-provider/health.svg)](https://phpackages.com/packages/benjam1-oauth-security-service-provider)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
