This package is abandoned and no longer maintained. The author suggests using the vgno/silex-spid-provider package instead.

SPiD service provider for Silex

2.0.0 2015-02-24 11:54 UTC

This package is not auto-updated.

Last update: 2022-02-01 12:36:41 UTC


Service provider making the SPiD PHP SDK available to your Silex application.

Build Status


Add "vgno/silex-spid-provider": "XXX" to the composer.json file inside your project and do a composer install. Check Composer for the latest available version.

Setup instructions

Register the SPiD service provider in your Silex app like this;

$app->register(new SPiDServiceProvider(), array(
    'spid.clientId'         => 'foobar',
    'spid.clientSecret'     => 'barfoo',
    'spid.clientSignSecret' => 'foobarsecret',
    'spid.redirectUri'      => '',
    'spid.domain'           => '',
    'spid.cookie'           => true,
    'spid.production'       => false,
    'spid.https'            => true,
    'spid.apiVersion'       => 2


After registering the SPiD service provider, the VGS_Client instance can be accessed from the $app variable like this;

$response = $app['spid']->api('/user/123');


The service provider comes with PHPUnit tests and can be run by doing a ./vendor/phpunit/phpunit/phpunit inside the silex-spid folder.


See more documentation and examples at the spid-php-sdk page (maintained by Schibsted Payment) at and (access for SPiD customers only).


Licensed under the MIT License, see LICENSE


Authored by Kristoffer Brabrand @ VG