PHPackages                             aa-aahmed/saml2-bridge-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. aa-aahmed/saml2-bridge-bundle

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

aa-aahmed/saml2-bridge-bundle
=============================

Symfony bundle that provide a SAML Identity Provider (idp).

v0.9.1(8y ago)01.3k1GPL-3.0-or-laterPHP &gt;=5.6,&lt;8.0-dev

Since Mar 15Pushed 5y agoCompare

[ Source](https://github.com/aa-aahmed/saml2-bridge-bundle)[ Packagist](https://packagist.org/packages/aa-aahmed/saml2-bridge-bundle)[ RSS](/packages/aa-aahmed-saml2-bridge-bundle/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (8)Versions (21)Used By (0)

SAML2 Bridge Bundle
===================

[](#saml2-bridge-bundle)

[![Coverage Status](https://camo.githubusercontent.com/7cb3664217108449ee410934a5d28a5d262468aba6855bffd346f77891da4ae1/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f41646163746976655341532f73616d6c322d6272696467652d62756e646c652f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/AdactiveSAS/saml2-bridge-bundle?branch=master)[![Build Status](https://camo.githubusercontent.com/aca72284e645d29cf150e2275f4f90992945886806f333d9d749564196f47dd1/68747470733a2f2f7472617669732d63692e6f72672f41646163746976655341532f73616d6c322d6272696467652d62756e646c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/AdactiveSAS/saml2-bridge-bundle)[![SensioLabsInsight](https://camo.githubusercontent.com/984278312e7290e155c82da4d0ecfadd5fb1406bac85a0b54430dd8f1fadc0a6/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f39653539633831372d623038612d343036352d626265352d3734323333356164636632622f6269672e706e67)](https://insight.sensiolabs.com/projects/9e59c817-b08a-4065-bbe5-742335adcf2b)A bundle that adds SAML capabilities to your application using [simplesamlphp/saml2](https://github.com/simplesamlphp/saml2) highly inspired by [OpenConext/Stepup-saml-bundle](https://github.com/OpenConext/Stepup-saml-bundle)

SAML Support
------------

[](#saml-support)

SAML Support is limited, this bundle can be used to provide a basic identity provider with the following support:

- Basic metadata
- Single Sign On:
    - Binding:
        - Http-POST &amp; Http-Redirect signed request
        - Http-POST &amp; Http-Post signed response
- Single Logout:
    - Binding:
        - Http-POST &amp; Http-Redirect signed request
        - Http-POST &amp; Http-Redirect signed response
    - Both identity provider initiated and service provider initiated

Getting started
---------------

[](#getting-started)

### Installation

[](#installation)

- Add the package to your Composer file

    ```
    composer require adactive-sas/saml2-bridge-bundle
    ```
- Add the bundle to your kernel in `app/AppKernel.php`

    ```
    public function registerBundles()
    {
        // ...
        $bundles[] = new AdactiveSas\Saml2BridgeBundle\AdactiveSasSaml2BridgeBundle();
    }
    ```

### Configuration

[](#configuration)

```
adactive_sas_saml2_bridge:
    hosted:
        metadata_route: name_of_the_route_of_metadata_url
        identity_provider:
            enabled: true
            service_provider_repository: service.name.of.entity_repository
            sso_route: name_of_the_route_of_the_single_sign_on_url
            sls_route: name_of_the_route_of_the_single_logout_url
            login_route: name_of_the_route_of_the_login_url
            logout_route: name_of_the_route_of_the_logout_url
            public_key: %idp_public_key_file_path%
            private_key: %idp_private_key_file_path%
```

Also add logout handler.

```
            logout:
                handlers: [adactive_sas_saml2_bridge.logout.handler]
```

The hosted configuration lists the configuration for the services (SP, IdP or both) that your application offers. SP and IdP functionality can be turned off and on individually through the repective `enabled` flags.

The inlined certificate in the last line can be replaced with `certificate_file` containing a filesystem path to a file which contains said certificate.

It is recommended to use parameters as listed above. The various `publickey` and `privatekey` variables are the contents of the key in a single line, without the certificate etc. delimiters. The use of parameters as listed above is highly recommended so that the actual key contents can be kept out of the configuration files (using for instance a local `parameters.yml` file).

The `service_provider_repository` is a repository of service providers for which you offer IdP services. The service configured *must* implement the `AdactiveSas\Saml2BridgeBundle\Entity\ServiceProviderRepository` interface.

### Example Usage

[](#example-usage)

#### Implement the Service Provider Repository

[](#implement-the-service-provider-repository)

```
