rd / authentication-bundle
用户管理 & 认证组件
0.2.0
2019-12-06 20:43 UTC
Requires
- php: ^7.4
- symfony/form: 5.*
- symfony/swiftmailer-bundle: ^3.4
- symfony/translation: 5.*
- symfony/twig-bundle: 5.*
This package is auto-updated.
Last update: 2024-09-07 07:37:57 UTC
README
概述
- 注册
- 账户验证
- 登录 & 登出
- 重置密码
这是一个完全配置好的组件。只需安装并复制/粘贴配置即可。
预览
安装
使用Composer安装组件
composer require rd/authentication-bundle
更新 config/packages/security.yaml
security: encoders: Rd\AuthenticationBundle\Entity\User: algorithm: bcrypt providers: database_provider: entity: class: Rd\AuthenticationBundle\Entity\User firewalls: dev: pattern: ^/(_(profiler|wdt)|css|images|js)/ security: false main: anonymous: ~ provider: database_provider form_login: login_path: rd_authentication_login check_path: rd_authentication_login csrf_token_generator: security.csrf.token_manager logout: path: rd_authentication_logout target: /
更新 config/packages/framework.yaml
framework: secret: '%env(APP_SECRET)%' csrf_protection: true
更新 config/routes/annotation.yaml
rd_authentication: resource: ../../vendor/rd/authentication-bundle/Controller/ type: annotation
更新数据库模式
bin/console doctrine:schema:update --force
用于实际使用的配置需要 config/packages/rd_authentication.yaml
rd_authentication: homepage: 'https://' background: 'http://getwallpapers.com/wallpaper/full/a/5/d/544750.jpg' email: from: 'no-reply@localhost.net'

