Advertisement
Guest User

Untitled

a guest
Dec 15th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.63 KB | None | 0 0
  1. # To get started with security, check out the documentation:
  2. # https://symfony.com/doc/current/security.html
  3. security:
  4.     encoders:
  5.         AppBundle\Entity\User: bcrypt
  6.  
  7.     # https://symfony.com/doc/current/security.html#b-configuring-how-users-are-loaded
  8.     providers:
  9.         database_users:
  10.             entity: { class: AppBundle:User, property: email }
  11.  
  12.     firewalls:
  13.         secured_area:
  14.             # this firewall applies to all URLs
  15.             pattern: ^/
  16.  
  17.             # but the firewall does not require login on every page
  18.             # denying access is done in access_control or in your controllers
  19.             anonymous: true
  20.  
  21.             # This allows the user to login by submitting a username and password
  22.             # Reference: http://symfony.com/doc/current/cookbook/security/form_login_setup.html
  23.             form_login:
  24.                 # The route name that the login form submits to
  25.                 check_path: security_login
  26.                 # The name of the route where the login form lives
  27.                 # When the user tries to access a protected page, they are redirected here
  28.                 login_path: security_login
  29.                 # Secure the login form against CSRF
  30.                 # Reference: http://symfony.com/doc/current/cookbook/security/csrf_in_login_form.html
  31.                 csrf_token_generator: security.csrf.token_manager
  32.  
  33.             logout:
  34.                 # The route name the user can go to in order to logout
  35.                 path: security_logout
  36.                 # The name of the route to redirect to after logging out
  37.                 target: homepage
  38.  
  39.     access_control:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement