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:
- # http://symfony.com/doc/current/book/security.html#where-do-users-come-from-user-providers
- providers:
- in_memory:
- memory:
- users:
- paul:
- password: test
- roles: 'ROLE_USER'
- admin:
- password: test
- roles: 'ROLE_ADMIN'
- encoders:
- Symfony\Component\Security\Core\User\User: plaintext
- firewalls:
- secured_area:
- anonymous: ~
- http_basic: ~
- logout:
- path: /logout
- target: /
- # disables authentication for assets and the profiler, adapt it according to your needs
- dev:
- pattern: ^/(_(profiler|wdt)|css|images|js)/
- security: false
- # main:
- # anonymous: ~
- # 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:
- #requre ROLE_ADMIN for /admin
- - { path: ^/admin, roles: ROLE_ADMIN }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement