duanbi1983 2013-08-02 15:05
浏览 57
已采纳

HWIOAuthBundle和FOSUserBundle集成

I followed these two documentations : https://github.com/hwi/HWIOAuthBundle/tree/master/Resources/doc (for HWIOAuth) https://gist.github.com/danvbe/4476697 (to integrate HWIOAuth with FOSUB)

And I get this error

ServiceNotFoundException: You have requested a non-existent service "hwi_oauth.resource_ownermap.main".

I found the same error in stackoverflow : Symfony2.3 - HWIOAuthBundle Config ServiceNotFoundException

But I think that my ressource_owners in config.yml is well configured.

Here is it :

 fos_user:
    db_driver: orm
    firewall_name: main
    user_class: MyProject\UserBundle\Entity\User
    registration:
        form:
            type: myproject_user_registration
        confirmation:
            enabled: true
            template: FOSUserBundle:Registration:email.txt.twig



 hwi_oauth:
    firewall_name: main
    fosub:
        username_iterations: 30
        properties:
            yahoo: yahoo_id
            google: google_id
            windows_live: windows_live_id
            linkedin: linkedin_id
    resource_owners:
        any_name:
            type:                yahoo
            client_id:           X
            client_secret:       X
        any_name:
            type:                google
            client_id:           X
            client_secret:       X
            scope:               X 
        any_name:
            type:                windows_live
            client_id:           X
            client_secret:       X           
        any_name:
            type:                linkedin
            client_id:           X
            client_secret:       X
            scope:               X

I have the right values instead of X (without any "" I don't know if I should add this).

  • 写回答

3条回答 默认 最新

  • doumaikuang4202 2013-08-02 20:20
    关注

    The resources_owners section of the firewall in security.yml must also be configured to avoid that error.

    firewalls:
        main:
            oauth:
                resource_owners:
                    facebook:           "/login/check-facebook"
                    twitter:            "/login/check-google"
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 关于大棚监测的pcb板设计
  • ¥15 stm32开发clion时遇到的编译问题
  • ¥15 lna设计 源简并电感型共源放大器
  • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)
  • ¥15 Vue3地图和异步函数使用