身份验证请求不起作用

时间:2015-08-16 16:15:27

标签: symfony authentication request

我尝试设置身份验证过程,它工作正常,当我使用内存提供程序,如:

encoders:
    Symfony\Component\Security\Core\User\User:             
        algorithm: bcrypt
        cost: 12

providers:
    in_memory:
        memory:
            users:
                ryan:
                    password: $2a$12$LCY0MefVIEc3TYPHV9SNnuzOfyr2p/AXIGoQJEDs4am4JwhNz/jl
                    roles: 'ROLE_USER'
                admin:
                    password: $2a$12$LCY0MefVIEc3TYPHV9SNnuzOfyr2p/AXIGoQJEDs4am4JwhNz/j2
                    roles: 'ROLE_ADMIN'

当我尝试使用实体提供程序(在security.yml中)时,例如:

security:    
    encoders:
         AppBundle\Model\Entity\User: bcrypt

    providers:
         database_users:
          entity: { class: AppBundle\Model\Entity\User, property: username }

   firewalls:
         dev:
          pattern: ^/(_(profiler|wdt)|css|images|js)/
          security: false

         default:
          anonymous: ~
          http_basic: ~
          form_login:
          login_path: /login
          check_path: /login_check

access_control:
    # require ROLE_ADMIN for /admin*
    - { path: ^/admin, roles: ROLE_ADMIN }

以下错误显示:由于系统问题无法处理身份验证请求。

0 个答案:

没有答案