README.md 428 Bytes
Newer Older
Dainis Abols's avatar
Dainis Abols committed
1
2
3
4
# LDAP Authorization Library for University of Latvia

Install via Composer
```
5
composer req luitd/lu-ldap-authorization
Dainis Abols's avatar
Dainis Abols committed
6
7
8
9
10
11
12
13
14
15
16
17
18
```

## Usage
``` php
$ldapAuth = new LDAP($ldap_server, $ldap_dc);
$user = $ldapAuth->authorize($request->username, $request->password);
```

Variable $user will containt `false` on failed authorization and `LDAPUser` object on succesfull authorization. 

## Requirements

 - PHP 7.2
19
 - PHP LDAP Extension