Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # To get started with security, check out the documentation:
- # https://symfony.com/doc/current/security.html
- security:
- encoders:
- AppBundle\Entity\User: bcrypt
- # https://symfony.com/doc/current/security.html#b-configuring-how-users-are-loaded
- providers:
- database_users:
- entity: { class: AppBundle:User, property: email }
- firewalls:
- secured_area:
- # this firewall applies to all URLs
- pattern: ^/
- # but the firewall does not require login on every page
- # denying access is done in access_control or in your controllers
- anonymous: true
- # This allows the user to login by submitting a username and password
- # Reference: http://symfony.com/doc/current/cookbook/security/form_login_setup.html
- form_login:
- # The route name that the login form submits to
- check_path: security_login
- # The name of the route where the login form lives
- # When the user tries to access a protected page, they are redirected here
- login_path: security_login
- # Secure the login form against CSRF
- # Reference: http://symfony.com/doc/current/cookbook/security/csrf_in_login_form.html
- csrf_token_generator: security.csrf.token_manager
- logout:
- # The route name the user can go to in order to logout
- path: security_logout
- # The name of the route to redirect to after logging out
- target: homepage
- access_control:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement