gepur-it/ldap-bundle
Composer 安装命令:
composer require gepur-it/ldap-bundle
包简介
Authorisation bundle fot gepur apps
README 文档
README
Authorisation bundle fot gepur apps
Fix security.yaml:
add provider to providers section in security.yaml
security:
...
providers:
gepur_ldap:
id: GepurIt\LdapBundle\Contracts\ErpUserProviderInterface
add api key and ldap authenticators:
security:
...
firewalls:
...
main:
guard:
authenticators:
- GepurIt\LdapBundle\Guard\ApiKeyAuthenticator
- GepurIt\LdapBundle\Guard\LdapAuthenticator
entry_point: GepurIt\LdapBundle\Guard\ApiKeyAuthenticator
add logout handler (to clear api key):
security:
...
firewalls:
...
main:
...
logout:
path: logout
target: /login
invalidate_session: true
success_handler: GepurIt\LdapBundle\Logout\LogoutSuccessHandler
handlers: [GepurIt\LdapBundle\Logout\LogoutHandler]
full added configs:
security:
...
providers:
gepur_ldap:
id: GepurIt\LdapBundle\Contracts\ErpUserProviderInterface
firewalls:
dev:
pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false
main:
pattern: ^/
stateless: true
anonymous: ~
logout:
path: logout
target: /login
invalidate_session: true
success_handler: GepurIt\LdapBundle\Logout\LogoutSuccessHandler
handlers: [GepurIt\LdapBundle\Logout\LogoutHandler]
guard:
authenticators:
- GepurIt\LdapBundle\Guard\ApiKeyAuthenticator
- GepurIt\LdapBundle\Guard\LdapAuthenticator
entry_point: GepurIt\LdapBundle\Guard\ApiKeyAuthenticator
统计信息
- 总下载量: 10.12k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 4
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-01-15