mithat / sentry_ldap_for_laravel_5
PHP 5.3+ 带Ldap的完整认证和授权系统
2.3
2017-08-09 07:14 UTC
Requires
- php: >=5.3.3
Requires (Dev)
- illuminate/cookie: 4.0.*
- illuminate/database: 4.0.*
- illuminate/session: 4.0.*
- ircmaxell/password-compat: 1.0.*
- mockery/mockery: 0.7.2
Suggests
- illuminate/database: Default sentry user, group and throttling implementations.
- ircmaxell/password-compat: Default hashing uses PHP 5.5 password_* functions, with forward-compatible support.
This package is not auto-updated.
Last update: 2024-09-20 20:56:56 UTC
README
SentryLdap是Cartalyst Sentry库的分支。增加了新的功能,如ldap认证。SentryLdap是一个PHP 5.3+的完整认证和授权系统。它还提供了用户组和其他安全功能等附加功能。
此分支适用于Laravel 5.3!
Sentry是一套与框架无关的接口,提供了默认实现,尽管您可以使用任何适合的实现。
功能
它还提供了用户组和其他安全功能等附加功能
- Ldap登录
Sentry功能
- 可配置的认证(可以使用任何类型的认证,例如用户名或电子邮件)
- 授权
- 用户激活 (可选)
- 组和组权限
- "记住我"
- 用户暂停
- 登录节流 (可选)
- 用户封禁
- 密码重置
- 用户数据
- 接口驱动 - 随意切换您的实现
安装
SentryLdap的安装非常简单。打开您的composer.json文件,并在require数组中添加以下内容
"mithat/sentry_ldap_for_laravel_5": "2.3.*"
到您的composer.json文件,然后遵循以下指南之一,以使SentryLdap与您喜欢的框架一起工作。
有关Sentry的更多信息,请访问Sentry网站:https://cartalyst.com/manual/sentry/2.1
使用
此库的ldap功能仍然是测试版。您必须更改配置文件中的这些行。
'ldap' => array(
'server' => 'ldapserver',
'port' => 'ldapport'
),
在此设置之后,您必须遵循Sentry原始文档。您可以使用以下方式使用ldap登录;
// Set login credentials
$credentials = array(
'userid' => 'demo',
'password' => 'demo',
);
// Try to authenticate the user
$user = Sentry::authenticateWithLdap($credentials, false);
还有Sentry::authenticateWithLdapAndRemember($credentials); 函数。
支持
我们通过我们的帮助论坛、在IRC的#cartalyst频道提供正常sentry问题的支持,以及通过GitHub问题(仅限错误)为Ldap问题提供支持。