Advertisement
Guest User

Untitled

a guest
Jul 10th, 2017
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.81 KB | None | 0 0
  1. #
  2. # Working
  3.  
  4. security.config:
  5.   providers:
  6.     main:
  7.       users:
  8.         florian: { password: *****, roles: ROLE_USER }
  9.   firewalls:
  10.     login: { pattern: /login, security: true, anonymous: true }
  11.     profiler: { pattern: /_profiler.*, security: true, anonymous: true }
  12.     login_check: { pattern: /login_check, security: true, anonymous: true, form_login: true }
  13.     main:
  14.       pattern:    /.*
  15.       form_login: true
  16.       anonymous:  true
  17.       logout:     { path: /logout, target: /login }
  18.   access_control:
  19.     - { path: /login, role: IS_AUTHENTICATED_ANONYMOUSLY }
  20.     - { path: /login_check, role: IS_AUTHENTICATED_ANONYMOUSLY }
  21.     - { path: /customer.*, role: ROLE_USER }
  22.     - { path: /.*, role: IS_AUTHENTICATED_ANONYMOUSLY }
  23.  
  24. fos_user.config:
  25.   db_driver: odm
  26.   class:
  27.     model:
  28.       user: Application\AppUserBundle\Document\User
  29.  
  30.  
  31. #
  32. #  NOT WORKING
  33. #
  34.  
  35. security.config:
  36.     providers:
  37.         fos_user:
  38.             password_encoder: &password_encoder
  39.                 sha1
  40.             id: fos_user.user_manager
  41.     firewalls:
  42.         public:
  43.             pattern: .*
  44.             form_login:
  45.                 login_path:                     /login
  46.                 use_forward:                    false
  47.                 check_path:                     /login-check
  48.                 failure_path:                   null
  49.                 always_use_default_target_path: false
  50.                 default_target_path:            /
  51.                 target_path_parameter:          _target_path
  52.                 use_referer:                    false
  53.             logout: true
  54.             anonymous: true
  55.  
  56. fos_user.config:
  57.     db_driver: mongodb
  58.     encoder:
  59.         alorithm:
  60.           <<: *password_encoder
  61.     class:
  62.         model:
  63.             user: Application\AppUserBundle\Document\User
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement