PHPackages                             cultuurnet/silex-service-provider-oauth - 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. cultuurnet/silex-service-provider-oauth

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

cultuurnet/silex-service-provider-oauth
=======================================

A Silex service provider for our OAuth component.

02.1kPHP

Since Aug 1Pushed 6y ago25 watchersCompare

[ Source](https://github.com/cultuurnet/silex-service-provider-oauth)[ Packagist](https://packagist.org/packages/cultuurnet/silex-service-provider-oauth)[ RSS](/packages/cultuurnet-silex-service-provider-oauth/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

```
Archived because it is no longer used by any publiq applications and has not been updated significantly since 2015.

```

Silex Service Provider OAuth
============================

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

[![Build Status](https://camo.githubusercontent.com/07afe91b925106f267d03ae59d07e41704e3d5913ee9668829db770e1cdf7ddc/68747470733a2f2f7472617669732d63692e6f72672f63756c747575726e65742f73696c65782d736572766963652d70726f76696465722d6f617574682e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/cultuurnet/silex-service-provider-oauth)

This is an UiTID [OAuth 1.0](http://tools.ietf.org/html/rfc5849) webservice authentication provider for the [Silex SecurityServiceProvider](http://silex.sensiolabs.org/doc/providers/security.html).

Usage
-----

[](#usage)

There's a [demo application](https://github.com/cultuurnet/demo-silex-oauth)which shows you how to integrate &amp; configure this component.

First register the provider in your Silex application. Supply the base url of the desired UiTID API environment, and an OAuth consumer key &amp; secret that are allowed to access the UiTID Credentials API.

```
$app->register(
    new \CultuurNet\SilexServiceProviderOAuth\OAuthServiceProvider(),
    array(
        'oauth.fetcher.base_url' => 'http://acc2.uitid.be',
        'oauth.fetcher.consumer' => array(
            'key' => 'notsosecretkey',
            'secret' => 'verysecret',
        ),
    )
);
```

Define a service named *oauth.model.provider.nonce\_provider* that implements *CultuurNet\\SymfonySecurityOAuth\\Model\\Provider\\NonceProviderInterface*. The cultuurnet/symfony-security-oauth-redis package provides an implementation that used Redis for storage. It uses the predis PHP client library for Redis. However, you are free to use your own implementation for a suitable storage mechanism.

```
$app['predis.client'] = $app->share(
    function () {
        return new \Predis\Client('tcp://127.0.0.1:6379');
    }
);

$app['oauth.model.provider.nonce_provider'] = $app->share(
    function (\Silex\Application $app) {
        return new \CultuurNet\SymfonySecurityOAuthRedis\NonceProvider(
            $app['predis.client']
        );
    }
);
```

Then configure a firewall to make use of the *oauth* authentication provider:

```
$app->register(
  new \Silex\Provider\SecurityServiceProvider(),
  array(
      'security.firewalls' => array(
          'myapi' => array(
              'pattern' => '^/my/api/.*',
              'oauth' => true,
              'stateless' => true,
           ),
      ),
  )
);
```

For improved performance, you can cache the tokens retrieved from the UiTID Credentials API. The best way to do this is by wrapping the original oauth.model.provider.token\_provider service in a decorator that implements the same interface and takes care of caching. Again, you are free to use your own implementation for a suitable storage mechanism. The cultuurnet/symfony-security-oauth-redis package provides an implementation that used Redis.

```
$app->extend(
    'oauth.model.provider.token_provider',
    function (
        \CultuurNet\SymfonySecurityOAuth\Model\Provider\TokenProviderInterface $tokenProvider,
        \Silex\Application $app
    ) {
        return new \CultuurNet\SymfonySecurityOAuthRedis\TokenProviderCache(
            $tokenProvider,
            $app['predis.client']
        );
    }
);
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 Bus Factor1

Top contributor holds 65.2% 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/d36d172d00ced6637c459c23a28191f50ed5e6bbe46ec97e07b78f166fbdff18?d=identicon)[dev-publiq](/maintainers/dev-publiq)

![](https://www.gravatar.com/avatar/df052a58ecfa5a07fd2b4cb12bb128ab28ff4b8e82fb0831eab81623b898ddb4?d=identicon)[madewithlove-machine-user](/maintainers/madewithlove-machine-user)

---

Top Contributors

[![nleroy](https://avatars.githubusercontent.com/u/111720?v=4)](https://github.com/nleroy "nleroy (15 commits)")[![cyberwolf](https://avatars.githubusercontent.com/u/95102?v=4)](https://github.com/cyberwolf "cyberwolf (8 commits)")

### Embed Badge

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

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

###  Alternatives

[namshi/jose

JSON Object Signing and Encryption library for PHP.

1.8k99.6M101](/packages/namshi-jose)[league/oauth1-client

OAuth 1.0 Client Library

99698.8M106](/packages/league-oauth1-client)[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[gesdinet/jwt-refresh-token-bundle

Implements a refresh token system over Json Web Tokens in Symfony

70516.4M35](/packages/gesdinet-jwt-refresh-token-bundle)[league/oauth2-google

Google OAuth 2.0 Client Provider for The PHP League OAuth2-Client

41721.2M118](/packages/league-oauth2-google)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)

PHPackages © 2026

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