Skip to content

Commit

Permalink
API Remove SAML module code and update namespaces for SilverStripe\LDAP
Browse files Browse the repository at this point in the history
  • Loading branch information
robbieaverill committed Sep 27, 2017
1 parent 3c190cc commit 2857c2d
Show file tree
Hide file tree
Showing 41 changed files with 108 additions and 983 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ language: php

env:
global:
- COMPOSER_ROOT_VERSION="4.0.x-dev"
- COMPOSER_ROOT_VERSION="1.0.x-dev"

matrix:
include:
Expand All @@ -26,7 +26,7 @@ before_script:
- composer update

script:
- if [[ $PHPUNIT_TEST ]]; then vendor/bin/phpunit tests/; fi
- if [[ $PHPUNIT_TEST ]]; then vendor/bin/phpunit; fi
- if [[ $PHPUNIT_COVERAGE_TEST ]]; then phpdbg -qrr vendor/bin/phpunit --coverage-clover=coverage.xml; fi
- if [[ $PHPCS_TEST ]]; then vendor/bin/phpcs --standard=framework/phpcs.xml.dist src/ tests/ ; fi

Expand Down
23 changes: 0 additions & 23 deletions .upgrade.yml

This file was deleted.

64 changes: 0 additions & 64 deletions CHANGELOG.md

This file was deleted.

11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
# SilverStripe Active Directory module
# SilverStripe LDAP module

[![Build Status](https://secure.travis-ci.org/silverstripe/silverstripe-activedirectory.svg)](https://travis-ci.org/silverstripe/silverstripe-activedirectory)
[![Build Status](https://secure.travis-ci.org/silverstripe/silverstripe-ldap.svg)](https://travis-ci.org/silverstripe/silverstripe-ldap)

## Introduction

This SilverStripe module provides Active Directory integration. It comes with three major components:
This SilverStripe module provides LDAP integration. It comes with two major components:

* Single sign-on authentication with SAML
* Synchronisation of Active Directory users and group memberships via LDAP
* Active Directory authentication via LDAP binding

These components may be used in any combination, also alongside the default SilverStripe authentication scheme.

## Requirements

* PHP 5.5+ with extensions: ldap, openssl, dom, and mcrypt
* PHP 5.6+ with extensions: ldap, openssl, dom, and mcrypt
* SilverStripe 4.0+
* Active Directory on Windows Server 2008 R2 or greater (AD)
* Active Directory Federation Services 2.0 or greater (ADFS)
Expand Down Expand Up @@ -65,4 +64,4 @@ AD user synchronisation and authentication is hidden behind the backend (server

## Changelog

The changelog can be found at [CHANGELOG.MD](CHANGELOG.MD).
Please see the GitHub releases for changes.
22 changes: 11 additions & 11 deletions _config/ldap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@ Name: ldapconfig
---
SilverStripe\Control\Director:
rules:
'LDAPDebug': SilverStripe\ActiveDirectory\Control\LDAPDebugController
'LDAPDebug': SilverStripe\LDAP\Control\LDAPDebugController

SilverStripe\Security\Group:
extensions:
- SilverStripe\ActiveDirectory\Extensions\LDAPGroupExtension
- SilverStripe\LDAP\Extensions\LDAPGroupExtension
SilverStripe\Security\Member:
extensions:
- SilverStripe\ActiveDirectory\Extensions\LDAPMemberExtension
- SilverStripe\LDAP\Extensions\LDAPMemberExtension

SilverStripe\ActiveDirectory\Authenticators\LDAPAuthenticator:
SilverStripe\LDAP\Authenticators\LDAPAuthenticator:
name: "LDAP"

SilverStripe\ActiveDirectory\Services\LDAPService:
SilverStripe\LDAP\Services\LDAPService:
allow_password_change: false

SilverStripe\Core\Injector\Injector:
Expand All @@ -28,20 +28,20 @@ SilverStripe\Core\Injector\Injector:
SilverStripe\Dev\Backtrace:
ignore_function_args:
-
- 'SilverStripe\\ActiveDirectory\\Model\\LDAPGateway'
- 'SilverStripe\\LDAP\\Model\\LDAPGateway'
- 'authenticate'
-
- 'SilverStripe\\ActiveDirectory\\Model\\LDAPGateway'
- 'SilverStripe\\LDAP\\Model\\LDAPGateway'
- 'changePassword'
-
- 'SilverStripe\\ActiveDirectory\\Model\\LDAPGateway'
- 'SilverStripe\\LDAP\\Model\\LDAPGateway'
- 'resetPassword'
-
- 'SilverStripe\\ActiveDirectory\\Services\\LDAPService'
- 'SilverStripe\\LDAP\\Services\\LDAPService'
- 'authenticate'
-
- 'SilverStripe\\ActiveDirectory\\Services\\LDAPService'
- 'SilverStripe\\LDAP\\Services\\LDAPService'
- 'setPassword'
-
- 'SilverStripe\\ActiveDirectory\\Services\\LDAPService'
- 'SilverStripe\\LDAP\\Services\\LDAPService'
- 'passwordHistoryWorkaround'
6 changes: 0 additions & 6 deletions _config/legacy.yml

This file was deleted.

32 changes: 0 additions & 32 deletions _config/saml.yml

This file was deleted.

15 changes: 7 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "silverstripe/activedirectory",
"description": "Adds Active Directory support to SilverStripe including user synchronisation and SSO/LDAP authentication",
"name": "silverstripe/ldap",
"description": "Adds LDAP support to SilverStripe including user synchronisation and authentication",
"type": "silverstripe-module",
"keywords": ["silverstripe", "ad", "active", "directory", "ldap", "sso", "saml"],
"keywords": ["silverstripe", "ad", "active", "directory", "ldap"],
"license": "BSD-3-Clause",
"authors": [
{
Expand All @@ -21,22 +21,21 @@
"symbiote/silverstripe-queuedjobs": "^4@dev",
"zendframework/zend-ldap": "^2.5.1",
"zendframework/zend-authentication": "^2.5.1",
"zendframework/zend-session": "^2.5.1",
"onelogin/php-saml": "^2.10.7"
"zendframework/zend-session": "^2.5.1"
},
"require-dev": {
"phpunit/phpunit": "^5.7",
"squizlabs/php_codesniffer": "^3.0"
},
"extra": {
"branch-alias": {
"dev-master": "4.x-dev"
"dev-master": "1.0.x-dev"
}
},
"autoload": {
"psr-4": {
"SilverStripe\\ActiveDirectory\\": "src/",
"SilverStripe\\ActiveDirectory\\Tests\\": "tests/"
"SilverStripe\\LDAP\\": "src/",
"SilverStripe\\LDAP\\Tests\\": "tests/"
}
},
"minimum-stability": "dev",
Expand Down
2 changes: 1 addition & 1 deletion license.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2016, SilverStripe Limited
Copyright (c) 2017, SilverStripe Limited
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Expand Down
6 changes: 2 additions & 4 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
<phpunit bootstrap="framework/tests/bootstrap.php" colors="true">

<testsuite name="Default">
<directory>tests</directory>
<directory>tests/</directory>
</testsuite>

<filter>
<whitelist addUncoveredFilesFromWhitelist="true">
<directory suffix=".php">src/.</directory>
<directory suffix=".php">src/</directory>
<exclude>
<directory suffix=".php">tests/</directory>
</exclude>
</whitelist>
</filter>

</phpunit>
10 changes: 3 additions & 7 deletions src/Authenticators/LDAPAuthenticator.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?php

namespace SilverStripe\ActiveDirectory\Authenticators;
namespace SilverStripe\LDAP\Authenticators;

use SilverStripe\ActiveDirectory\Forms\LDAPLoginForm;
use SilverStripe\ActiveDirectory\Services\LDAPService;
use SilverStripe\Control\Controller;
use SilverStripe\Control\Email\Email;
use SilverStripe\Control\HTTPRequest;
use SilverStripe\Core\Config\Config;
use SilverStripe\Core\Injector\Injector;
use SilverStripe\LDAP\Forms\LDAPLoginForm;
use SilverStripe\LDAP\Services\LDAPService;
use SilverStripe\ORM\ValidationResult;
use SilverStripe\Security\Authenticator;
use SilverStripe\Security\Member;
Expand All @@ -19,10 +19,6 @@
* Class LDAPAuthenticator
*
* Authenticate a user against LDAP, without the single sign-on component.
*
* See SAMLAuthenticator for further information.
*
* @package activedirectory
*/
class LDAPAuthenticator extends MemberAuthenticator
{
Expand Down
6 changes: 3 additions & 3 deletions src/Authenticators/LDAPChangePasswordHandler.php
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<?php

namespace SilverStripe\ActiveDirectory\Authenticators;
namespace SilverStripe\LDAP\Authenticators;

use Exception;
use Psr\Log\LoggerInterface;
use SilverStripe\ActiveDirectory\Forms\LDAPChangePasswordForm;
use SilverStripe\ActiveDirectory\Services\LDAPService;
use SilverStripe\Control\Director;
use SilverStripe\Control\HTTP;
use SilverStripe\Control\HTTPResponse;
use SilverStripe\Core\Injector\Injector;
use SilverStripe\LDAP\Forms\LDAPChangePasswordForm;
use SilverStripe\LDAP\Services\LDAPService;
use SilverStripe\ORM\ValidationResult;
use SilverStripe\Security\Member;
use SilverStripe\Security\MemberAuthenticator\ChangePasswordHandler;
Expand Down
4 changes: 2 additions & 2 deletions src/Authenticators/LDAPLoginHandler.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

namespace SilverStripe\ActiveDirectory\Authenticators;
namespace SilverStripe\LDAP\Authenticators;

use SilverStripe\ActiveDirectory\Forms\LDAPLoginForm;
use SilverStripe\LDAP\Forms\LDAPLoginForm;
use SilverStripe\Security\MemberAuthenticator\LoginHandler;

class LDAPLoginHandler extends LoginHandler
Expand Down
Loading

0 comments on commit 2857c2d

Please sign in to comment.