lp-digital/hauth-bundle

此包已被废弃且不再维护。未建议替代包。

BackBee v1.* 实例的社会登录

安装次数: 1,969

依赖: 0

建议者: 0

安全: 0

星标: 0

关注者: 3

分支: 0

开放问题: 0

类型:backbee-bundle

v0.1.4 2017-06-16 09:11 UTC

This package is not auto-updated.

Last update: 2021-04-28 08:46:19 UTC


README

Build Status Code Climate Test Coverage

hauth-bundle 允许通过 hybridauth/hydridauth 库轻松地在 BackBee 实例上实现社交登录。

目前,仅支持防火墙 rest_api_area(即 BackBee 对工具栏的认证)。

安装

编辑你的 BackBee 项目的 composer.json 文件。

require 部分添加新的依赖项到包中

# composer.json
...
    "require": {
        ...
        "lp-digital/hauth-bundle": "~0.1"
    },
...

保存并关闭文件。

在你的项目上运行 composer update。

激活

编辑你的 BackBee 项目的 repository/Config/bundles.yml 文件。

在文件末尾添加以下行

# bundles configuration - repository/Config/bundles.yml
...
hauth: LpDigital\Bundle\HAuthBundle\HAuth

保存并关闭文件。

然后运行更新数据库的命令

./backbee bundle:update hauth --force

根据你的配置,可能需要清除缓存。

配置

在你的 BackBee 项目中创建并编辑配置文件 repository/Config/bundle/hauth/config.yml

配置主要遵循 hybridauth 的配置语法,请参阅 http://hybridauth.sourceforge.net/userguide.html

hybridauth:
    store_user_profile: true       # Is the social user's profile will be stored in db?        
    firewalls: ['rest_api_area']   # An array of BackBee firewalls for which hauth-bundle will propose hydrid authentication
    base_url: /hauth.html          # The entry point of the hybrid authentication
    debug_mode: false
    providers:
        {Provider name}:           # Provider name, see hybridauth documentation for supported list
            enabled: {true|false}  # Is the provider enabled?
            fa-icon:               # Optional, the Font Awesome icon class name for the provider
            scope:                 # The permissions requested to the provider
            keys:
                id:                # your provider application key
                secret:            # your provider secret token
        ...

该项目由 Lp digital 支持

主要开发者 : @crouillon

根据 GPL3 许可证发布