Guest User

Untitled

a guest
Aug 27th, 2020
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 1.83 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.         users:
  10.             entity:
  11.                # the class of the entity that represents users
  12.                 class: Entity\User
  13.                 # the property to query by - e.g. username, email, etc
  14.                 property: username
  15.                 # optional: if you're using multiple Doctrine entity
  16.                 # managers, this option defines which one to use
  17.                 # manager_name: 'customer'
  18.     firewalls:
  19.         dev:
  20.             pattern: ^/(_(profiler|wdt)|css|images|js)/
  21.             security: false
  22.         main:
  23. #            pattern: ^/api-login
  24.             anonymous: true
  25. #            form_login:
  26. #                login_path: api_login
  27. #                check_path: api_login
  28.             lazy: true
  29.             provider: users_in_memory
  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: ^/admin, roles: ROLE_ADMIN }
  48.         # - { path: ^/profile, roles: ROLE_USER }
  49. #         - { path: ^/api-login, roles: IS_AUTHENTICATED_ANONYMOUSLY }
Add Comment
Please, Sign In to add comment