GithubHelp home page GithubHelp logo

vavr / yii2-adldap-module Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zolij/yii2-adldap-module

0.0 0.0 0.0 157 KB

yii2 wrapper for adLDAP php module

Home Page: www.edvler-blog.de

PHP 100.00%

yii2-adldap-module's Introduction

yii2-adldap-module

Yii2 extension for adLDAP (https://packagist.org/packages/adldap/adldap)

Installation

Composer

The preferred way to install this extension is through Composer.

Either run

php composer.phar require edvlerblog/yii2-adldap-module "v1.0.0"

or add

"edvlerblog/yii2-adldap-module": "v1.0.0"

to the require section of your composer.json

Configuration

Add this code in your components section of the application configuration (eg. config/main.php):

'components' => [
	..... 
	
	'ldap' => [
		'class'=>'Edvlerblog\Ldap',
		'options'=> [
				'ad_port'      => 389,
				'domain_controllers'    => array('AdServerName1','AdServerName2'),
				'account_suffix' =>  '@test.lan',
				'base_dn' => "DC=test,DC=lan",
				// for basic functionality this could be a standard, non privileged domain user (required)
				'admin_username' => 'ActiveDirectoryUser',
				'admin_password' => 'StrongPassword'
			]
	]
	
	...
]

More abount config options

Examples

To use the yii2-adldap-module you need only one line. You can use the yii2-adldap-module everywhere where \Yii::$app works (Controllers, Widgets,...).

Authenticate User:

$authUser = \Yii::$app->ldap->authenticate("username","password");
var_dump ($authUser);

Group membership of a User:

$groups = \Yii::$app->ldap->user()->groups("username");
var_dump($groups);  

Get informations about a Group:

$groupinfo= \Yii::$app->ldap->group()->info("example_group");
var_dump($groupinfo);  

....

More examples

DOCUMENTATION

yii2-adldap-module is only a wrapper class. Feel free to learn more about the underlying adLDAP.

You can find the website at https://github.com/adldap/adLDAP/ or the class documentation at

https://github.com/adldap/adLDAP/wiki/adLDAP-Developer-API-Reference

yii2-adldap-module's People

Contributors

zolij avatar edvler avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.