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:
- ryan:
- password: ryanpass
- roles: 'ROLE_USER'
- admin:
- password: kitten
- 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
- 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
- access_control:
- # require ROLE_ADMIN for /admin*
- - { path: ^/admin, roles: ROLE_ADMIN }
- encoders:
- Symfony\Component\Security\Core\User\User:
- algorithm: bcrypt
- cost: 5
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement