无法识别的选项在 Symfony 2 中resource_owners


unrecognized options resource_owners in symfony 2

我正在使用HWIOAuthBundle来集成Facebook oAuth,当我更新我的架构时,我收到以下错误

  [Symfony'Component'Config'Definition'Exception'InvalidConfigurationException]  
  Unrecognized options "resource_owners" under "security.firewalls.oauth"   

这是我的security.yml,我真的不知道这个错误是什么

jms_security_extra:
    secure_all_services: false
    expressions: true
security:
    providers:
        fos_userbundle:
            id: fos_user.user_provider.username
       # administrators:
        #    entity: { class: NotificaHomeBundle:TbNotificaUser }
    encoders:
        "FOS'UserBundle'Model'UserInterface": sha512
   firewalls:
        main:
            pattern: ^/
            form_login:
                provider: fos_userbundle
                csrf_provider: form.csrf_provider
                login_path: /login
                check_path: /login_check
            logout: true
            anonymous: true
        oauth:
         resource_owners:
          facebook: "/login/check-facebook"
        oauth_user_provider:
                    #this is my custom user provider, created from FOSUBUserProvider - will manage the 
                    #automatic user registration on your site, with data from the provider (facebook. google, etc.)
                    service: my_user_provider
        oauth_token:
            pattern:    ^/oauth/v2/token
            security:   false

        oauth_authorize:
            pattern:    ^/oauth/v2/auth
            form_login:
                 provider: fos_userbundle
                 check_path: /oauth/v2/auth/login_check
                 login_path: /oauth/v2/auth/login
            anonymous: true
            # Add your favorite authentication process here
        api:
            pattern:    ^/api
            fos_oauth:  true
            stateless:  true
            anonymous: true # can be omitted as its default value
        # admin_area:
           # pattern:    ^/xadmin
           # http_basic: ~
    access_control:
        - { path: ^/login, role: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/admin/, role: ROLE_ADMIN }
        - { path: ^/notifica/login, role: IS_AUTHENTICATED_ANONYMOUSLY }
       # - { path: ^/xadmin/, role: ROLE_ADMIN }
        - { path: ^/api, roles: [ IS_AUTHENTICATED_ANONYMOUSLY ] }
    role_hierarchy:
        ROLE_ADMIN:       ROLE_USER
        ROLE_SUPER_ADMIN: ROLE_ADMIN

您的标识是错误的。YAML 文件基于缩进。

firewalls:
    main:
        pattern: ^/
        form_login:
            provider: fos_userbundle
            csrf_provider: form.csrf_provider
            login_path: /login
            check_path: /login_check
        oauth:
            resource_owners:
                facebook:           "/login/check-facebook"
                google:             "/login/check-google"
            login_path:        /login
            failure_path:      /login
            oauth_user_provider:
                #this is my custom user provider, created from FOSUBUserProvider - will manage the 
                #automatic user registration on your site, with data from the provider (facebook. google, etc.)
                service: my_user_provider