symfony证书内存提供程序无效

时间:2017-09-11 22:26:47

标签: php symfony

我尝试使用在内存部分定义它的用户登录,但我收到错误无效的凭据,这里是我的security.yml

security:
   encoders:
       Symfony\Component\Security\Core\User\User: plaintext

# https://symfony.com/doc/current/security.html#b-configuring-how-users-are-loaded
   providers:
       in_memory:
           memory:
               users:
                   user:
                       password: 1234
                       roles: 'ROLE_USER'
                   root:
                       password: 1234
                       roles: 'ROLE_ADMIN'

   firewalls:
       dev:
           pattern: ^/(_(profiler|wdt)|css|images|js)/
           security: false
       main:
           pattern: ^/
           anonymous: true
           form_login:
               login_path: login
               check_path: login
           logout:
               path: logout
               target: homepage
   access_control:
       - { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY }
       - { path: ^/, roles: ROLE_ADMIN }
那么问题是什么? :|

0 个答案:

没有答案