HWIOAuthBundle:没有名称为“ check-google”的资源所有者

库巴杰夫

我安装了HWIOAuthBundle。

但是,当我尝试使用Google帐户登录时遇到此错误:

没有名称为“ check-google”的资源所有者。

我和其他API都有同样的错误(Facebook,Twitter ...)

这是我的security.yml:

firewalls:
    main:
        pattern:  ^/login$
        security: true
        anonymous: true
        provider: user_provider
        form_login:
            login_path: fos_user_security_login
            check_path: fos_user_security_check
        logout:
            path:   fos_user_security_logout
            target: /
        oauth:
            resource_owners:
                facebook:           "/login/check-facebook"
                google:             "/login/check-google"
                twitter:            "/login/check-twitter"
                linkedin:           "/login/check-linkedin"
            login_path:        /login
            check_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

我的routing.yml:

#HWIOAuthBundle routes
    hwi_oauth_security:
    resource: "@HWIOAuthBundle/Resources/config/routing/login.xml"
    prefix: /connect/by

hwi_oauth_connect:
    resource: "@HWIOAuthBundle/Resources/config/routing/connect.xml"
    prefix: /connect/by

hwi_oauth_redirect:
    resource: "@HWIOAuthBundle/Resources/config/routing/redirect.xml"
    prefix:   /login

facebook_login:
    pattern: /login/check-facebook
    options: { i18n: false }

google_login:
    pattern: /login/check-google
    options: { i18n: false }

twitter_login:
    pattern: /login/check-twitter

linkedin_login:
    pattern: /login/check-linkedin

和我的config.yml:

# HWIOAuthBundle
hwi_oauth:
    connect:
        account_connector: my_user_provider
    firewall_name: main
    fosub:
        username_iterations: 30
        properties:
            # these properties will be used/redefined later in the custom FOSUBUserProvider service.
            facebook: facebook_id
            google: google_id
            twitter: twitter_id
            linkedin: linkedin_id
    resource_owners:
        facebook:
            type:                facebook
            client_id:           xxxxx
            client_secret:       xxxxx
            scope:               ""
            options:
                display: popup
        google:
            type:                google
            client_id:           xxxx
            client_secret:       xxxx
            scope:               "https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile"
        twitter:
            type:                twitter
            client_id:           xxxx
            client_secret:       xxxx
            scope:               ""
        linkedin:
            type:                linkedin
            client_id:           xxxx
            client_secret:       xxxx
            scope:               "r_basicprofile"

services:
    hwi_oauth.user.provider.entity:
        class: HWI\Bundle\OAuthBundle\Security\Core\User\OAuthUserProvider
    cmf_create.persistence.orm.object_mapper:
        class: Midgard\CreatePHP\Mapper\DoctrineOrmMapper
        arguments:
            - "%cmf_create.map%"
            - "@doctrine"

我的问题与没有资源所有者(名称为google)(HWIOAuthBundle和FOSUserBundle集成)相同我怎样才能解决这个问题 ?

库巴杰夫

我解决了这个问题。我发现此链接很有帮助:

http://m2mdas.github.io/blog/2013/11/21/integrate-hwioauthbundle-with-fosuserbundle/

在上面的链接中,将cacert.pem添加到路径后,它解决了该问题。

HWIOAuthBundle使用Buzz curl客户端与Web服务进行通信。默认情况下,Buzz启用SSL证书检查。在某些服务器上,CA证书信息可能不存在。要添加CA证书信息,请从此页面下载cacert.pem并将curl.cainfo php ini变量设置为cacert.pem的位置,例如curl.cainfo = /path/to/cacert.pem

我错过了上面的步骤。

问候,

Mk6ix

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

没有名称为“ check-facebook”的资源所有者

来自分类Dev

没有名称为“ google”的资源所有者(集成了HWIOAuthBundle和FOSUserBundle)

来自分类Dev

奇怪的HWIOAuthBundle和树枝错误“没有资源所有者,名称为'google'。”

来自分类Dev

'YYSTYPE'没有名称为'-'的联合类型成员

来自分类Dev

厨师:没有名称为“ httpd”的公式

来自分类Dev

没有名称为sayHello的请求处理方法

来自分类Dev

Eclipselink Maven没有名称为EntityManager的持久性提供程序

来自分类Dev

没有名称为defaultPersistenceUnit的EntityManager的持久性提供程序

来自分类Dev

Spring MVC:DispatcherServlet中没有名称为mvc-dispatcher的映射

来自分类Dev

着色器中没有名称为“ u_proj”的制服

来自分类Dev

Doctrine \ DBAL \ Schema \ SchemaException:表'users'上没有名称为'deleted_at'的列

来自分类Dev

没有名称为defaultPersistenceUnit的EntityManager的持久性提供程序

来自分类Dev

转到:没有名称的模板

来自分类Dev

没有名称的模板类

来自分类Dev

ElasticsearchIllegalArgumentException没有名称功能

来自分类Dev

没有名称的图标

来自分类Dev

资源所有者的行动组

来自分类Dev

LibGdx Shader(“着色器中没有名称为'u_texture'的统一制服”)

来自分类Dev

警告:此模块中没有名称为“positio”的属性,未在univention ucs 中设置值

来自分类Dev

查找没有名称的目录或文件?

来自分类Dev

如何获取没有名称的django url的url

来自分类Dev

嵌套类没有名称空间

来自分类Dev

删除没有名称的外键Oracle

来自分类Dev

将没有名称的变量传递给函数

来自分类Dev

XML中没有名称空间的元素

来自分类Dev

没有名称的Angularjs表单验证输入字段

来自分类Dev

检索没有名称空间的Office.customeXMLparts

来自分类Dev

WWW :: Mechanize :: Firefox选择元素没有名称

来自分类Dev

计算没有名称或ID的通用DIV标签

Related 相关文章

  1. 1

    没有名称为“ check-facebook”的资源所有者

  2. 2

    没有名称为“ google”的资源所有者(集成了HWIOAuthBundle和FOSUserBundle)

  3. 3

    奇怪的HWIOAuthBundle和树枝错误“没有资源所有者,名称为'google'。”

  4. 4

    'YYSTYPE'没有名称为'-'的联合类型成员

  5. 5

    厨师:没有名称为“ httpd”的公式

  6. 6

    没有名称为sayHello的请求处理方法

  7. 7

    Eclipselink Maven没有名称为EntityManager的持久性提供程序

  8. 8

    没有名称为defaultPersistenceUnit的EntityManager的持久性提供程序

  9. 9

    Spring MVC:DispatcherServlet中没有名称为mvc-dispatcher的映射

  10. 10

    着色器中没有名称为“ u_proj”的制服

  11. 11

    Doctrine \ DBAL \ Schema \ SchemaException:表'users'上没有名称为'deleted_at'的列

  12. 12

    没有名称为defaultPersistenceUnit的EntityManager的持久性提供程序

  13. 13

    转到:没有名称的模板

  14. 14

    没有名称的模板类

  15. 15

    ElasticsearchIllegalArgumentException没有名称功能

  16. 16

    没有名称的图标

  17. 17

    资源所有者的行动组

  18. 18

    LibGdx Shader(“着色器中没有名称为'u_texture'的统一制服”)

  19. 19

    警告:此模块中没有名称为“positio”的属性,未在univention ucs 中设置值

  20. 20

    查找没有名称的目录或文件?

  21. 21

    如何获取没有名称的django url的url

  22. 22

    嵌套类没有名称空间

  23. 23

    删除没有名称的外键Oracle

  24. 24

    将没有名称的变量传递给函数

  25. 25

    XML中没有名称空间的元素

  26. 26

    没有名称的Angularjs表单验证输入字段

  27. 27

    检索没有名称空间的Office.customeXMLparts

  28. 28

    WWW :: Mechanize :: Firefox选择元素没有名称

  29. 29

    计算没有名称或ID的通用DIV标签

热门标签

归档