我已经开发了自己的身份验证提供程序作为创始人here。
我曾经与in_memory
系统连接,但现在我无法再使用它了。我错过了什么吗?
security:
encoders:
Symfony\Component\Security\Core\User\User: plaintext
Acme\SecurityBundle\User\WebServiceUser: plaintext
firewalls:
login:
pattern: ^/login$
security: false
secured_area:
pattern: ^/
anonymous: ~
webservice-login:
login_path: /login
check_path: /login_check
provider: acme_provider
logout: ~
providers:
multiples:
chain:
providers: [in_memory, acme_provider]
acme_provider:
id: acme_demo_user_provider
in_memory:
memory:
users:
- { name: admin, password: pwd, roles: [ 'ROLE_ADMIN' ] }
答案 0 :(得分:2)
您已指定webservice-login
使用acme_provider
代替您的multiples
提供商。
试试这个:
security:
encoders:
Symfony\Component\Security\Core\User\User: plaintext
Acme\SecurityBundle\User\WebServiceUser: plaintext
firewalls:
login:
pattern: ^/login$
security: false
secured_area:
pattern: ^/
anonymous: ~
webservice-login:
login_path: /login
check_path: /login_check
provider: multiples
logout: ~
providers:
multiples:
chain:
providers: [in_memory, acme_provider]
acme_provider:
id: acme_demo_user_provider
in_memory:
memory:
users:
- { name: admin, password: pwd, roles: [ 'ROLE_ADMIN' ] }
表单将根据in_memory或acme_provider
对用户进行身份验证