Advertisement
Guest User

Untitled

a guest
Aug 12th, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 1.74 KB | None | 0 0
  1. security:
  2.     factories:
  3.        - "%kernel.root_dir%/../vendor/bundles/FOS/FacebookBundle/Resources/config/security_factories.xml"
  4.          
  5.     encoders:
  6.         Symfony\Component\Security\Core\User\User: plaintext
  7.  
  8.     role_hierarchy:
  9.         ROLE_ADMIN:      ROLE_USER
  10.         ROLE_SUPER_ADMIN: [ROLE_USER, ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH]
  11.  
  12.     providers:
  13.         fos_facebook:
  14.              id: fos_facebook.auth
  15.         in_memory:
  16.             users:
  17.                 user: { password: userpass, roles: [ 'ROLE_USER' ] }
  18.                 admin: { password: adminpass, roles: [ 'ROLE_ADMIN' ] }
  19.  
  20.     firewalls:
  21.         profiler:
  22.             pattern: ^/_profiler
  23.             security: false
  24.  
  25.         wdt:
  26.             pattern: ^/_wdt
  27.             security: false
  28.  
  29.         login:
  30.             pattern: ^/demo/secured/login$
  31.             security: false
  32.  
  33.         secured_area:
  34.             pattern:   ^/demo/secured/
  35.             form_login:
  36.                 check_path: /demo/secured/login_check
  37.                 login_path: /demo/secured/login
  38.             logout:
  39.                 path:  /demo/secured/logout
  40.                 target: /demo/
  41.             #anonymous: ~
  42.             #http_basic:
  43.             #    realm: "Secured Demo Area"
  44.         public:
  45.             # since anonymous is allowed users will not be forced to login
  46.              pattern:  ^/.*
  47.              fos_facebook: true
  48.              anonymous: true
  49.              logout: true
  50.  
  51.     access_control:
  52.        #- { path: /login, roles: IS_AUTHENTICATED_ANONYMOUSLY, requires_channel: https }
  53.          - { path: ^/secured/.*, role: [IS_AUTHENTICATED_FULLY] } # This is the route secured with fos_facebook
  54.          - { path: ^/.*, role: [IS_AUTHENTICATED_ANONYMOUSLY] }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement