umanit/2fa-sms
最新稳定版本:1.0.0
Composer 安装命令:
composer require umanit/2fa-sms
包简介
Extends scheb/2fa-bundle with two-factor authentication via SMS
README 文档
README
This package extends scheb/2fa-bundle with two-factor authentication using SMS.
Installation
composer require umanit/2fa-sms
// config/bundles.php return [ Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true], Scheb\TwoFactorBundle\SchebTwoFactorBundle::class => ['all' => true], Umanit\TwoFactorSms\UmanitTwoFactorSmsBundle::class => ['all' => true], ];
Configuration
In order to work, the bundle uses Symfony's Notifier component and the
SMS channel managed by the texter service.
You'll need to configure your application with
an SMS channel before you can use this bundle.
These are the default configuration values.
# Default configuration for extension with alias: "umanit_two_factor_sms"
umanit_two_factor_sms:
enabled: true
# A custom form renderer service that must implement "Scheb\TwoFactorBundle\Security\TwoFactor\Provider\TwoFactorFormRendererInterface".
form_renderer: null
# Twig template to pass to "Scheb\TwoFactorBundle\Security\TwoFactor\Provider\DefaultTwoFactorFormRenderer".
template: '@SchebTwoFactor/Authentication/form.html.twig'
# Custom auth code generator service that must implement "Umanit\TwoFactorSms\Security\AuthCode\AuthCodeGeneratorInterface".
code_generator: null
# The number of digits the generated auth code will have.
digits: 6
# Custom auth code sender service that must implement "Umanit\TwoFactorSms\Security\AuthCode\AuthCodeSenderInterface".
code_sender: null
# A valid \DateInterval used to expire the auth code.
expires_after: PT15M
# Custom auth code texter service that must implement "Umanit\TwoFactorSms\Texter\AuthCodeTexterInterface".
code_texter: null
# Custom texter message generator service that must implement "Umanit\TwoFactorSms\Texter\SmsMessageGeneratorInterface".
message_generator: null
# Message send by the texter. The template string [[auth_code]] will be replaced with the actual auth code.
message: '[[auth_code]]'
License
This software is available under the MIT license.
统计信息
- 总下载量: 3.97k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-03-24