Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- security:
- encoders:
- # Our user class and the algorithm we'll use to encode passwords
- # http://symfony.com/doc/current/book/security.html#encoding-the-user-s-password
- SoftUniBlogBundle\Entity\User: bcrypt
- providers:
- # in this example, users are stored via Doctrine in the database
- # To see the users at src/AppBundle/DataFixtures/ORM/LoadFixtures.php
- # To load users from somewhere else:http://symfony.com/doc/current/cookbook/security/custom_provider.html
- database_users:
- entity: { class: SoftUniBlogBundle:User, property: email }
- # http://symfony.com/doc/current/book/security.html#firewalls-authentication
- 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: blog_index
- access_control:
- # this is a catch-all for the admin area
- # additional security lives in the controllers
- # - { path: '^/(%locale%)/admin', roles: ROLE_ADMIN }
Add Comment
Please, Sign In to add comment