Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Kevin Schroeder:
(Almost) Stupid Easy PHP Integration with Active Directory on Azure
Apr 12, 2017 @ 17:31:04

Kevin Schroeder has a new post to his site showing an (almost) stupid easy Active Directory integration method on the Windows Azure service via PHP.

There is something nice about simply having to go to one company and say “I need X” and, lo, you have it. Clearly that’s an over-simplification and, to some degree, a lie, but for the Microsoft developers I’ve talked to who have had to make the switch to PHP that is one of the things that they have said the liked better about Microsoft.

This is a simple library that uses the league/oauth2-client to provide OAuth2 based integration with Active Directory. Out of the box it is configured to work with Active Directory on Azure but, though I haven’t tested it, you can provide a different configuration object to the primary adapter and you should be able to authenticate against any Active Directory implementation as long as it has OAuth2 connectivity.

If you haven't worked with Azure's Active Directory before, he includes an instructional video of how to get it set up first. With that in place he shows an example of using the library to make the authentication request to the AD server and how to log back out. He also includes the code you'll need to configure the library via the Magium Configuration Manager or, for those without Magento experience, with some alternate methods: PHP arrays, JSON, YAML or INI files.

tagged: integration activedirectory azure package example tutorial

Link: http://www.eschrade.com/page/almost-stupid-easy-php-integration-with-active-directory-on-azure

Make Me Pulse Blog:
Connect to Active Directory LDAP with PHP
Jun 26, 2009 @ 16:17:07

On the "Make Me Pulse" blog today Ludovic Hindryckx has a bit of code he's shared to let you connect PHP to an Active Directory server (via an LDAP connection).

Today we are going to see how to make an authentication with PHP and an Active Directory LDAP (AD). [...] This code sample has been tested on a Windows 2k3 server.

The script calls the ldap_connect connect function with the user-submitted username and password and runs a bind (as the user) and searches for an account with the same name. If the information is found, it returns back to the $info variable to be checked.

tagged: tutorial activedirectory ldap

Link:


Trending Topics: