Implemented the two factor auth login form.

This commit is contained in:
Jan Böhmer 2019-12-23 18:45:32 +01:00
parent 35b5640627
commit 10ca895309
5 changed files with 78 additions and 4 deletions

View file

@ -18,6 +18,11 @@ security:
anonymous: true
user_checker: App\Security\UserChecker
two_factor:
auth_form_path: 2fa_login
check_path: 2fa_login_check
csrf_token_generator: security.csrf.token_manager
# activate different ways to authenticate
#http_basic: true
@ -42,5 +47,7 @@ security:
# Easy way to control access for large sections of your site
# Note: Only the *first* access control that matches will be used
access_control:
# - { path: ^/admin, roles: ROLE_ADMIN }
# - { path: ^/profile, roles: ROLE_USER }
# This makes the logout route available during two-factor authentication, allows the user to cancel
- { path: ^/logout, role: IS_AUTHENTICATED_ANONYMOUSLY }
# This ensures that the form can only be accessed when two-factor authentication is in progress
- { path: ^/2fa, role: IS_AUTHENTICATED_2FA_IN_PROGRESS }