扩展:XenForoAuth

From MediaWiki.org
Jump to navigation Jump to search
This page is a translated version of the page Extension:XenForoAuth and the translation is 32% complete.

Other languages:
Deutsch • ‎English • ‎中文 • ‎日本語
MediaWiki扩展手册
OOjs UI icon advanced.svg
XenForoAuth
发布状态: 未维护
实现 User identity
描述 Provides login with a XenForo account in a configurable XenForo forum.
作者 Florian Schmidt (Florianschmidtwelzowtalk)
MediaWiki 1.27+
PHP 5.5+
数据更新
许可协议 MIT License
下载
使用的钩子
AuthChangeFormFields
LoadExtensionSchemaUpdates
ResourceLoaderGetLessVars
翻译XenForoAuth扩展如果在translatewiki.net可用
检查使用和版本矩阵。

The XenForoAuth extension allows wiki users to login with an account of a XenForo based online-forum. The extension uses the XenForo bd Api plugin (which needs to be installed on the XenForo forum in order to work with this extension) to request basic profile information.

条件

To use this extension you need at least:

  • MediaWiki 1.27+
  • MySQL (no PostgreSQL or SQLite support for now!)
  • PHP 5.5+
  • An API client in the forum with which your users can authenticate
  • Able to run composer update

安装

  • 下载文件,并将其放置在您extensions/文件夹中的XenForoAuth目录内。

Configuration

The extension provides two configuration variables to set the Client ID and Client Secret (you get this pair in the API Client settings of the XenForo forum, remove "<" and ">"). You also need to configure the base url where the api can be reached.

$wgXenForoAuthClientSecret = '<your-client-secret>';
$wgXenForoAuthClientId = '<your-client-id>';
$wgXenForoAuthBaseUrl = 'https://example.com/api/';

额外配置参数

配置变量 默认值 描述
$wgXenForoAuthButtonIcon 'images/xenForo_icon.png' The icon, which will be added to the "Log in with XenForo" button. Normally you would set the path to the icon of the forum here. The value has to be surrounded with '.
$wgXenForoAuthAutoCreate false Whether users from XenForo should be autocreated in this wiki. If you set this to true and an user logs in with XenForo and doesn't have a local connected account, it will be created automatically. If the username is already registered, the user will get an error message, that he couldn't be logged in.

Settings for the API Client

Please make sure, that you created an API Client in XenForo. Please also set your full url to Special:UserLogin into the Redirect Uri input field (e.g. https://www.example.com/wiki/Special:UserLogin). Please also add your domain to the White-listed Domains input field (e.g. *.example.com).