Page 1 sur 1

security.yaml

Posté : 24 août 2019, 18:34
par Methanfetamines
bonjour j'essaye activement de changer le check_path comme indiqué sur la doc

Code : Tout sélectionner

security: # https://symfony.com/doc/current/security.html#where-do-users-come-from-user-providers providers: from_database: entity: class: App\Entity\User property: username firewalls: dev: pattern: ^/(_(profiler|wdt)|css|images|js)/ security: false main: anonymous: true # http_basic: true # https://symfony.com/doc/current/security.html#firewalls-authentication # https://symfony.com/doc/current/security/impersonating_user.html # switch_user: true form_login: true check_path: login # Easy way to control access for large sections of your site # Note: Only the *first* access control that matches will be used access_control: - { path: ^/admin, roles: ROLE_ADMIN } # - { path: ^/profile, roles: ROLE_USER } #encoders:
la syntaxe est bonne si j'en crois https://symfony.com/doc/current/securit ... login.html

Mais symfony me renvoie une erreur :

The file "/var/www/html/my_project_name/config/packages/security.yaml" does not contain valid YAML: A colon cannot be used in an unquoted mapping value at line 23 (near " ") in /var/www/html/my_project_name/config/packages/security.yaml (which is loaded in resource "/var/www/html/my_project_name/config/packages/security.yaml").

merci pour le temps que vous voudrez m'accorder !

Re: security.yaml

Posté : 26 août 2019, 08:04
par Spols
j'y connais rien en symphony ni en yaml, mais selon ta doc il ne faut pas de "true" après form_login: