triemli

Untitled

Aug 31st, 2020
108
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.     encoders:
  3.         Entity\User:
  4.             algorithm: bcrypt
  5.  
  6.     # https://symfony.com/doc/current/security.html#where-do-users-come-from-user-providers
  7.     providers:
  8. #        users_in_memory: { memory: null }
  9.         fetcher:
  10.             id: Frontend\Security\UserProvider
  11. #        users:
  12. #            entity:
  13.                 # the class of the entity that represents users
  14. #                class: Frontend\Security\UserProvider
  15.                 # the property to query by - e.g. username, email, etc
  16. #                property: username
  17.                 # optional: if you're using multiple Doctrine entity
  18.                 # managers, this option defines which one to use
  19.                 # manager_name: 'customer'
  20.     firewalls:
  21.         dev:
  22.             pattern: ^/(_(profiler|wdt)|css|images|js)/
  23.             security: false
  24.         main:
  25.             anonymous: true
  26.             provider: fetcher
  27.             user_checker: Frontend\Security\UserChecker
  28.             form_login: true
  29.             lazy: true
  30.             guard:
  31.                 authenticators:
  32.                    - Frontend\Security\ApiAuthenticator
  33.             logout:
  34.                 path: api_logout
  35.                 # where to redirect after logout
  36.                 # target: app_any_route
  37.  
  38.             # activate different ways to authenticate
  39.             # https://symfony.com/doc/current/security.html#firewalls-authentication
  40.  
  41.             # https://symfony.com/doc/current/security/impersonating_user.html
  42.             # switch_user: true
  43.  
  44.     # Easy way to control access for large sections of your site
  45.     # Note: Only the *first* access control that matches will be used
  46.     access_control:
  47.         - { path: ^/api-login, roles: ROLE_ADMIN }
  48.  
Add Comment
Please, Sign In to add comment