Advertisement
Guest User

Untitled

a guest
Apr 6th, 2020
447
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 1.40 KB | None | 0 0
  1. security:
  2.     encoders:
  3.         App\Entity\User:
  4.             algorithm: auto
  5.  
  6.  
  7.     # https://symfony.com/doc/current/security.html#where-do-users-come-from-user-providers
  8.     providers:
  9.        # used to reload user from session & other features (e.g. switch_user)
  10.         app_user_provider:
  11.             entity:
  12.                 class: App\Entity\User
  13.                 property: email
  14.                
  15.     firewalls:
  16.         dev:
  17.             pattern: ^/(_(profiler|wdt)|css|images|js)/
  18.             security: false
  19.         main:
  20.             anonymous: lazy
  21.             provider: app_user_provider
  22.  
  23.             form_login:
  24.                login_path: connexion
  25.                check_path: connexion
  26.  
  27.             logout:
  28.                 path: deconnexion
  29.                 target: accueil
  30.             guard:
  31.                 authenticators:
  32.                    - App\Security\LoginFormAuthenticator
  33.             # activate different ways to authenticate
  34.             # https://symfony.com/doc/current/security.html#firewalls-authentication
  35.  
  36.             # https://symfony.com/doc/current/security/impersonating_user.html
  37.             # switch_user: true
  38.  
  39.     # Easy way to control access for large sections of your site
  40.     # Note: Only the *first* access control that matches will be used
  41.     access_control:
  42.        # - { path: ^/admin, roles: ROLE_ADMIN }
  43.         # - { path: ^/profile, roles: ROLE_USER }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement