Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # To get started with security, check out the documentation:
- # http://symfony.com/doc/current/book/security.html
- security:
- encoders:
- AppBundle\Entity\User:
- algorithm: bcrypt
- cost: 4
- # http://symfony.com/doc/current/book/security.html#where-do-users-come-from-user-providers
- providers:
- database_users:
- entity: { class: AppBundle:User, property: username }
- # our_db_provider:
- # entity:
- # class: AppBundle:User
- # property: username
- # in_memory:
- # memory:
- # users:
- # admin:
- # password: admin
- # roles: 'ROLE_ADMIN'
- firewalls:
- # disables authentication for assets and the profiler, adapt it according to your needs
- dev:
- # pattern: ^/(_(profiler|wdt)|css|images|js)/
- # security: false
- anonymous: ~
- http_basic: ~
- form_login:
- login_path: login
- check_path: login
- main:
- anonymous: ~
- form_login:
- login_path: login
- check_path: login
- # activate different ways to authenticate
- # http_basic: ~
- # http://symfony.com/doc/current/book/security.html#a-configuring-how-your-users-will-authenticate
- # form_login: ~
- # http://symfony.com/doc/current/cookbook/security/form_login_setup.html
- default:
- anonymous: ~
- http_basic: ~
- access_control:
- - { path: ^/admin, roles: ROLE_ADMIN }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement