kcchung / l5-openldap-auth
Laravel 5 的 OpenLDAP 认证驱动程序。
dev-master
2018-05-17 14:09 UTC
Requires
- php: >=5.5.0
- illuminate/auth: ~5.0
- illuminate/config: ~5.0
- illuminate/support: ~5.0
This package is not auto-updated.
Last update: 2024-10-02 09:42:35 UTC
README
Laravel 5 的 OpenLDAP 认证驱动程序。
安装
将以下内容添加到 composer.json
并使用 composer install
/ composer update
安装。
{
require: {
"kcchung/l5-openldap-auth": "dev-master"
}
}
添加到 Laravel
打开您的 config/app.php
文件并将服务提供者添加到 providers 数组中。
kcchung\L5OpenldapAuth\LdapAuthServiceProvider::class
更新您的 config/auth.php
以使用 ldap
驱动程序。
'driver' => 'ldap'
配置
手动创建一个 config/ldap.php
文件并添加以下内容
<?php
return [
'host' => 'ldaps://example.com',
'rdn' => 'ou=System,dc=example,dc=com', // rdn used by the user configured below, optional
'version' => '3', // LDAP protocol version (2 or 3)
'basedn' => 'ou=People,dc=example,dc=com', // basedn for users
'login_attribute' => 'uid', // login attributes for users
];
?>
扩展
如果您希望添加自己的函数,只需修改任何类。