tohtamysh/laravel-phpbb-bridge 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

tohtamysh/laravel-phpbb-bridge

最新稳定版本:v1.0.0

Composer 安装命令:

composer require tohtamysh/laravel-phpbb-bridge

包简介

Authentication module for Laravel 5.4 and phpBB 3.2

README 文档

README

For phpBB < 3.2 see CallMeNP/lara-auth-bridge Offers a simple API for the included custom phpBB authentication module for phpBB(3.0, 3.1) and Laravel 5.

Latest Stable Version License

Installation

Laravel

run composer
composer require tohtamysh/laravel-phpbb-bridge
add service provider

Register the Service Provider by adding it to your project's providers array in app.php

'providers' => array(
    Tohtamysh\LaravelPhpbbBridge\LaravelPhpbbBridgeServiceProvider::class,
);
publish config file
artisan vendor:publish --provider="Tohtamysh\LaravelPhpbbBridge\LaravelPhpbbBridgeServiceProvider"
edit config

Change configs config/laravel-phpbb-bridge.php

// Create a secret app key in 
'appkey' => 'yoursecretapikey'

// Update the column names used for the Laravel Auth driver 
'username_column' => 'user_login',
'password_column' => 'user_password'

// Set true if you use multiAuth, false if default Laravel Auth
'client_auth' => false
exclude URIs from CSRF protection

In file app/Http/Middleware/VerifyCsrfToken.php add

protected $except = [
        	'auth-bridge/*',
    	];

More info how to exclude uris on laravel site

phpBB 3.2

copy files

Copy all files in the phpBB32 directory to your phpBB install folder

edit config

Edit the file located at {PHPBB-ROOT}/ext/laravel/bridgebb/auth/provider/bridgebb.php

define('LARAVEL_URL', 'http://www.example.com'); //your laravel application's url
define('BRIDGEBB_API_KEY', "yoursecretapikey"); //the same key you created earlier
define ('LARAVEL_CUSTOM_USER_DATA', serialize ([
    'email' => 'user_email',
    'dob' => 'user_birthday',
])); // Update the columns you want to come from Laravel user to phpBB user
setting

Login to the phpBB admin panel enable bridgebb extension and after set bridgebb as the authentication module

统计信息

  • 总下载量: 2.92k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 8
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 8
  • Watchers: 3
  • Forks: 5
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-06-07