我正在尝试设置FOSUserBundle为我FOSOAuthServerBundle启用的服务器的身份验证提供程序.在FOSOAuthServerBundle已经工作了我之前正确试图实现FOSUserBundle,我也有过FOSUserBundle工作没有FOSOAuthServerBundle,但我不能让他们一起工作.
我的问题是应该oauth_authorize在security.yml下面的:firewall中为身份验证提供程序指定什么?
# app/config/security.yml
security:
providers:
fos_userbundle:
id: fos_user.user_provider.username
encoders:
FOS\UserBundle\Model\UserInterface: sha512
firewalls:
oauth_token:
pattern: ^/oauth/v2/token
security: false
oauth_authorize:
pattern: ^/oauth/v2/auth
# WHAT GOES HERE?
api:
pattern: ^/api
fos_oauth: true
stateless: true
access_control:
- { path: ^/api, roles: [ IS_AUTHENTICATED_FULLY ] }
Run Code Online (Sandbox Code Playgroud)
我试图验证用户而不是客户端.
非常感谢.