SHARE
TWEET

Untitled

a guest Jan 28th, 2016 86 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # To get started with security, check out the documentation:
  2. # http://symfony.com/doc/current/book/security.html
  3. security:
  4.  
  5.     # http://symfony.com/doc/current/book/security.html#where-do-users-come-from-user-providers
  6.     providers:
  7.         in_memory:
  8.             memory:
  9.                 users:
  10.                     paul:
  11.                         password: test
  12.                         roles: 'ROLE_USER'
  13.                     admin:
  14.                         password: test
  15.                         roles: 'ROLE_ADMIN'
  16.  
  17.     encoders:
  18.         Symfony\Component\Security\Core\User\User: plaintext
  19.  
  20.     firewalls:
  21.         secured_area:
  22.             anonymous: ~
  23.             http_basic: ~
  24.             logout:
  25.                 path: /logout
  26.                 target: /
  27.  
  28.         # disables authentication for assets and the profiler, adapt it according to your needs
  29.         dev:
  30.             pattern: ^/(_(profiler|wdt)|css|images|js)/
  31.             security: false
  32.  
  33.         # main:
  34.             # anonymous: ~
  35.             # activate different ways to authenticate
  36.  
  37.             # http_basic: ~
  38.             # http://symfony.com/doc/current/book/security.html#a-configuring-how-your-users-will-authenticate
  39.  
  40.             # form_login: ~
  41.             # http://symfony.com/doc/current/cookbook/security/form_login_setup.html
  42.  
  43.         default:
  44.             anonymous: ~
  45.             http_basic: ~
  46.  
  47.     access_control:
  48.         #requre ROLE_ADMIN for /admin
  49.         - { path: ^/admin, roles: ROLE_ADMIN }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top