Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # To get started with security, check out the documentation:
- # https://symfony.com/doc/current/security.html
- security:
- providers:
- in_memory:
- memory:
- users:
- ryan:
- password: $2y$12$I8FWSSf3EoEuFZl2IpF9Cudf2QTsaTogw2sLVebCfnvhg4ipCBm9i
- roles: 'ROLE_USER'
- admin:
- password: $2y$12$lGtjwI1YH.bwy05/UU8I6.ereM2o/WrmREjZH5w.H4tKJTqV7IKCm
- roles: 'ROLE_ADMIN'
- encoders:
- Symfony\Component\Security\Core\User\User:
- algorithm: bcrypt
- cost: 12
- firewalls:
- dev:
- pattern: ^/(_(profiler|wdt)|css|images|js)/
- security: false
- main:
- anonymous: ~
- logout_on_user_change: true
- http_basic: ~
- form_login:
- login_path: login
- check_path: login
- success-handler: app.login_handler
- logout:
- path: /logout
- target: /
- access_control:
- # require ROLE_ADMIN for /admin*
- - { path: ^/admin, roles: ROLE_ADMIN }
- # require ROLE_USER for /user*
- - { path: ^/user, roles: ROLE_USER}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement