Skip to content

Commit

Permalink
Added security configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
aschempp authored and bytehead committed Jun 28, 2019
1 parent 47a03c3 commit 3282a55
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
9 changes: 9 additions & 0 deletions core-bundle/README.md
Expand Up @@ -135,6 +135,13 @@ security:
remember_me: true
use_forward: true

two_factor:
auth_form_path: contao_frontend_two_factor
check_path: contao_frontend_two_factor
auth_code_parameter_name: verify
success_handler: contao.security.two_factor.frontend_success_handler
failure_handler: contao.security.two_factor.frontend_failure_handler

remember_me:
secret: '%secret%'
remember_me_parameter: autologin
Expand All @@ -150,6 +157,8 @@ security:
- { path: ^/contao/login$, roles: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/contao/logout$, roles: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/contao(/|$), roles: ROLE_USER }
- { path: ^/_contao/two-factor, roles: [IS_AUTHENTICATED_2FA_IN_PROGRESS, ROLE_MEMBER] }
- { path: ^, roles: [IS_AUTHENTICATED_2FA_IN_PROGRESS, IS_AUTHENTICATED_ANONYMOUSLY] }
```

The Contao core-bundle as well as the installation-bundle are now installed and
Expand Down
9 changes: 9 additions & 0 deletions manager-bundle/src/Resources/skeleton/app/security.yml
Expand Up @@ -63,6 +63,13 @@ security:
remember_me: true
use_forward: true

two_factor:
auth_form_path: contao_frontend_two_factor
check_path: contao_frontend_two_factor
auth_code_parameter_name: verify
success_handler: contao.security.two_factor.frontend_success_handler
failure_handler: contao.security.two_factor.frontend_failure_handler

remember_me:
secret: '%secret%'
remember_me_parameter: autologin
Expand All @@ -78,3 +85,5 @@ security:
- { path: ^/contao/login$, roles: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/contao/logout$, roles: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/contao(/|$), roles: ROLE_USER }
- { path: ^/_contao/two-factor, roles: [IS_AUTHENTICATED_2FA_IN_PROGRESS, ROLE_MEMBER] }
- { path: ^, roles: [IS_AUTHENTICATED_2FA_IN_PROGRESS, IS_AUTHENTICATED_ANONYMOUSLY] }

0 comments on commit 3282a55

Please sign in to comment.