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

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

cultuurnet/silex-uitid-provider
===============================

Silex UiTID authentication provider.

2.x-dev(5y ago)17.0k↓60%1[2 PRs](https://github.com/cultuurnet/silex-uitid-provider/pulls)1GPL-3.0PHPPHP &gt;=5.5.0

Since Jun 29Pushed 9mo ago26 watchersCompare

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

READMEChangelogDependencies (8)Versions (6)Used By (1)

[![Maintenance](https://camo.githubusercontent.com/da1c37922ee85cfedfade49f28e01ed7469289ca359541507541ac093e4dfcfd/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7374617475732d756e6d61696e7461696e65642d7265642e737667)](https://camo.githubusercontent.com/da1c37922ee85cfedfade49f28e01ed7469289ca359541507541ac093e4dfcfd/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7374617475732d756e6d61696e7461696e65642d7265642e737667)

⚠️ This project is no longer maintained
---------------------------------------

[](#️-this-project-is-no-longer-maintained)

Silex UiTID provider
====================

[](#silex-uitid-provider)

[![Build Status](https://camo.githubusercontent.com/a21a85e27075058188140acb7851a6ea93c848a9f90d7542bf2d155ad3ecd761/68747470733a2f2f7472617669732d63692e6f72672f63756c747575726e65742f73696c65782d75697469642d70726f76696465722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/cultuurnet/silex-uitid-provider)[![Coverage Status](https://camo.githubusercontent.com/a72ee2b3466adde34dbc7e2c00cd1c36e220ae086f9351875e5beaa115d593f4/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f63756c747575726e65742f73696c65782d75697469642d70726f76696465722f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/r/cultuurnet/silex-uitid-provider?branch=master)

Contains various Controller- and Service Providers for Silex projects to integrate UiTID authentication.

0. Dependencies
---------------

[](#0-dependencies)

You'll need the `Session` and `UrlGenerator` services provided by Silex:

```
$app->register(new \Silex\Provider\SessionServiceProvider());
$app->register(new \Silex\Provider\UrlGeneratorServiceProvider());

```

You will also need to register the `ServiceControllerServiceProvider`:

```
$app->register(new Silex\Provider\ServiceControllerServiceProvider());

```

This service makes it possible to load controllers as if they are services, so you can use separate classes for your controllers outside of the ControllerProvider classes.

Lastly you will have to register the `CultureFeedServiceProvider`, with some additional configuration:

```
$app->register(new \CultuurNet\UiTIDProvider\CultureFeed\CultureFeedServiceProvider(), array(
	'culturefeed.endpoint' => 'http://example.com/,
	'culturefeed.consumer.key' => 'example-consumer-key',
	'culturefeed.consumer.secret' => 'example-consumer-secret',
));

```

1. UiTID Authentication
-----------------------

[](#1-uitid-authentication)

You will need to register the `AuthServiceProvider` and `UserServiceProvider` like this:

```
$app->register(new CultuurNet\UiTIDProvider\Auth\AuthServiceProvider());
$app->register(new CultuurNet\UiTIDProvider\User\UserServiceProvider());

```

And you will need to mount the `AuthControllerProvider` to a path of your liking:

```
$app->mount(
	'culturefeed/oauth',
	new \CultuurNet\UiTIDProvider\Auth\AuthControllerProvider()
);

```

At this point, your visitors can authenticate if you redirect them to , where your-website.com should obviously be your own domain name.

After authentication, they will be redirected back to the URL set in the destination parameter. In this case, `http://your-website.com`.

2. User info
------------

[](#2-user-info)

You can access info for the current user, or other users, by using the following services provided by the `UserServiceProvider` that you registered in step 1:

- **`$app['uitid_user_session_service']`**: An instance of `CultuurNet\UiTIDProvider\User\UserSessionService`, which can return minimal user info of the currently logged in user.
- **`$app['uitid_user_session_data']`**: An instance of `CultuurNet\Auth\User`, which contains the user id and access token. (Also known as the "minimal user info".)
- **`$app['uitid_user_service']`**: An instance of `CultuurNet\UiTIDProvider\User\UserService`, which can return user data by id or username.
- **`$app['uitid_user']`**: An instance of `CultuurNet\UiTIDProvider\User\User`, which contains all extra info of the currently logged in user.

Optionally, you can mount the `UserControllerProvider` to a path of your liking:

```
$app->mount('uitid', new \CultuurNet\UiTIDProvider\User\UserControllerProvider());

```

This will provide the following paths (in this example prefixed with `uitid`):

- `uitid/user`: Returns data of the current user in JSON format.
- `uitid/logout`: Invalidates the current session and logs the user out.

3. Restricting access to paths for non-authenticated users.
-----------------------------------------------------------

[](#3-restricting-access-to-paths-for-non-authenticated-users)

You can easily restrict access to paths for non-authenticated users by registering the `SecurityServiceProvider` and `UiTIDSecurityServiceProvider`:

```
$app->register(new \Silex\Provider\SecurityServiceProvider());
$app->register(new \CultuurNet\UiTIDProvider\Security\UiTIDSecurityServiceProvider());

```

Afterwards you'll have to configure the firewall settings. Make sure to allow access to the paths that you mounted in step 1, use the `uitid` authenticator, and use the `$app['uitid_firewall_user_provider']` as the user provider.

Here's an example of a valid firewall configuration:

```
$app['security.firewalls'] = array(
	'unsecured' => array(
    	'pattern' => '^/culturefeed/oauth',
	),
	'secured' => array(
   	 	'pattern' => '^.*$',
    	'uitid' => true,
    	'users' => $app['uitid_firewall_user_provider'],
	),
);

```

This example will only allow access to the paths beginning wih `/culturefeed/oauth` until the user is logged in. All other paths will return a response with status code 403.

More info on firewall configuration can be found in the [Silex documentation](http://silex.sensiolabs.org/doc/providers/security.html).

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance40

Moderate activity, may be stable

Popularity23

Limited adoption so far

Community23

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 70.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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2164d ago

### 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

[![bertramakers](https://avatars.githubusercontent.com/u/959026?v=4)](https://github.com/bertramakers "bertramakers (58 commits)")[![bramcordie](https://avatars.githubusercontent.com/u/1107185?v=4)](https://github.com/bramcordie "bramcordie (10 commits)")[![cyberwolf](https://avatars.githubusercontent.com/u/95102?v=4)](https://github.com/cyberwolf "cyberwolf (6 commits)")[![alduya](https://avatars.githubusercontent.com/u/255367?v=4)](https://github.com/alduya "alduya (4 commits)")[![lucwollants](https://avatars.githubusercontent.com/u/1322949?v=4)](https://github.com/lucwollants "lucwollants (2 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")[![larrybolt](https://avatars.githubusercontent.com/u/803296?v=4)](https://github.com/larrybolt "larrybolt (1 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

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

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

###  Alternatives

[cnam/security-jwt-service-provider

Service Provider for usage jwt token for auth

60108.1k2](/packages/cnam-security-jwt-service-provider)[davec49/silex2-simpleuser

A simple database-backed user provider for Silex 2.0, with associated services and controllers forked from jasongrimes/SimpleUser.

131.1k](/packages/davec49-silex2-simpleuser)

PHPackages © 2026

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