2017 © Pedro Peláez
 

library activedirectory

User authentication and access control tools for Active Directory

image

tangervu/activedirectory

User authentication and access control tools for Active Directory

  • Monday, August 18, 2014
  • by tangervu
  • Repository
  • 1 Watchers
  • 4 Stars
  • 58 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 4 % Grown

The README.md

ActiveDirectory.php

User authentication and access control tools for Active Directory, (*1)

Installation

The recommended way to install Connection.php is through Composer., (*2)

{
    "require": {
        "tangervu/activedirectory": "dev-master"
    }
}

Example

<?php
require('vendor/autoload.php'); //Use composer autoload

$ad = new ActiveDirectory\ActiveDirectory();

//Load AD server settings from ini file
$ad->loadConfig('config.ini');

//Identify user. Uses Apache authentication (mod_auth_kerb) as primary authentication method but has http auth as fallback method.
$login = $ad->identify();

//Get dname for user $login
$dname = $ad->getDname($login);

//Get user information
$userInfo = $ad->getInfo($dname);

//Check if user is member of an AD group (recursive search)
if($ad->isMemberOf($dname, "Test Group", true)) {
    $isMember = true;
}
else {
    $isMember = false;
}

License

LGPL v3, (*3)

The Versions

18/08 2014

dev-master

9999999-dev https://github.com/tangervu/ActiveDirectory.php

User authentication and access control tools for Active Directory

  Sources   Download

LGPL-3.0

authentication ldap active directory access control kerberos