PHPackages                             antons/silverstripe-ssp - 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. antons/silverstripe-ssp

ActiveSilverstripe-module[Authentication &amp; Authorization](/categories/authentication)

antons/silverstripe-ssp
=======================

Authentication module for Silverstripe 3.1+ using the simpleSAMLphp library.

1.0(10y ago)3205[2 issues](https://github.com/antons-/silverstripe-ssp/issues)[3 PRs](https://github.com/antons-/silverstripe-ssp/pulls)BSD-3-ClausePHPPHP &gt;=5.3

Since Nov 6Pushed 10y ago1 watchersCompare

[ Source](https://github.com/antons-/silverstripe-ssp)[ Packagist](https://packagist.org/packages/antons/silverstripe-ssp)[ Docs](https://github.com/antons-/silverstripe-ssp)[ RSS](/packages/antons-silverstripe-ssp/feed)WikiDiscussions master Synced today

READMEChangelog (3)Dependencies (6)Versions (5)Used By (0)

SilverStripe SSP module
=======================

[](#silverstripe-ssp-module)

**I am no longer maintaining this module since SilverStripe Ltd have released their own SAML authentication module - [silverstripe/silverstripe-activedirectory](https://github.com/silverstripe/silverstripe-activedirectory)**

---

This module is a wrapper around the [SimpleSAMLphp](http://simplesamlphp.org/) thirdparty library, providing federated authentication.

It replaces the `Security` controller with the `SSPSecurity` controller which deals with authenticating users.

**Caution: This is NOT a plug and play module! This module is just a light wrapper, and requires configuration of the complex SimpleSAMLphp library.**

Parts of this module is based on the [silverstripe-labs/silverstripe-shibboleth](https://github.com/silverstripe-labs/silverstripe-shibboleth) module for SilverStripe 2.4.

Requirements
------------

[](#requirements)

- SilverStripe 3.1+
- PHP 5.3
- [SimpleSAMLphp requirements](https://simplesamlphp.org/docs/stable/simplesamlphp-install#section_3)

Installation
------------

[](#installation)

Use [`Composer`](http://doc.silverstripe.org/framework/en/installation/composer) to install the module in the root folder of your SilverStripe website:

```
composer require antons/silverstripe-ssp

```

### Module setup

[](#module-setup)

*Adapt the paths/domains according to your specific environment in the following instructions.*

1. Create a link to the `vendor/simplesamlphp/simplesamlphp/www` folder using any of the following methods:

    a. Create a [mod\_alias](http://httpd.apache.org/docs/current/mod/mod_alias.html) directive in the Apache virtual host for your SilverStripe install. Call it `simplesaml` and point it to `vendor/simplesamlphp/simplesamlphp/www` folder. This is the preferred method.

    ```

    	ServerName yourdomain.com
        DocumentRoot /var/www/ss
    	Alias /var/www/ss/simplesaml /var/www/ss/vendor/simplesamlphp/simplesamlphp/www

    ```

    b. Instead of mod\_alias, you can create a symbolic link on your system

    ```
    //Linux + Mac
    ln -s /var/www/ss/vendor/simplesamlphp/simplesamlphp/www /var/www/ss/simplesaml

    //Windows
    mklink /D C:\xampp\htdocs\ss\simplesaml C:\xampp\htdocs\ss\vendor\simplesamlphp\simplesamlphp\www

    ```

    c. If you are using a shared hosting environment and don't have access to the Apache virtual config or the direct filesystem, you can add the following code to your `mysite/_config.php` file and PHP will create the symbolic link.

    ```
    if(!file_exists(BASE_PATH . '/simplesaml')) {
    	symlink(realpath(dirname(__FILE__)) . '../vendor/simplesamlphp/simplesamlphp/www', realpath(dirname(__FILE__)) . '/../simplesaml');
    }

    ```
2. Make a copy of the default SimpleSAMLphp configuration files:

    ```
    cd vendor/simplesamlphp/simplesamlphp
    cp -R config-templates config
    cp -R metadata-templates metadata

    ```
3. Follow steps 1 to 5 of the [SimpleSAMLphp Service Provider Quickstart](http://simplesamlphp.org/docs/stable/simplesamlphp-sp) documentation to set up SimpleSAMLphp.

### SingleLogoutService (SLO)

[](#singlelogoutservice-slo)

If you want to setup the `SingleLogoutService` response location for your identity provider metadata, the URL is:

```
https://yourdomain.com/Security/loggedout

```

This is required for the identity provider to logout properly.

### SimpleSAMLphp frontend

[](#simplesamlphp-frontend)

You should be able to access the frontend to SimpleSAMLphp via `https://www.yourdomain.com/simplesaml`. Ensure that you set a password to the frontend in the SimpleSAMLphp config file.

### Adding authenticators to SSPSecurity

[](#adding-authenticators-to-sspsecurity)

To add a new authenticator, create a new class that extends `SSPAuthenticator` and implement the `SSPAuthenticator->authenticate()` function:

```
