security.yaml

Répondre


Cette question est un moyen d’empêcher des soumissions automatisées de formulaires par des robots.
Smileys
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :!: :?: :idea: :arrow: :| :mrgreen: =D> #-o =P~ :^o :non: :priere: 8-|
Voir plus de smileys
  Revue du sujet
 

  Étendre la vue Revue du sujet : security.yaml

Re: security.yaml

par Spols » 26 août 2019, 08:04

j'y connais rien en symphony ni en yaml, mais selon ta doc il ne faut pas de "true" après form_login:

security.yaml

par Methanfetamines » 24 août 2019, 18:34

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 !