小编cax*_*ton的帖子

如何将FOSUserBundle配置为启用FOSOAuthServerBundle的服务器的身份验证提供程序

我正在尝试设置FOSUserBundle为我FOSOAuthServerBundle启用的服务器的身份验证提供程序.在FOSOAuthServerBundle已经工作了我之前正确试图实现FOSUserBundle,我也有过FOSUserBundle工作没有FOSOAuthServerBundle,但我不能让他们一起工作.

我的问题是应该oauth_authorizesecurity.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)

我试图验证用户而不是客户端.

非常感谢.

php symfony oauth-2.0 fosuserbundle

13
推荐指数
1
解决办法
1万
查看次数

标签 统计

fosuserbundle ×1

oauth-2.0 ×1

php ×1

symfony ×1