Extension:XenForoAuth

This page is a translated version of the page Extension:XenForoAuth and the translation is 32% complete.
MediaWiki 拡張機能マニュアル
XenForoAuth
リリースの状態: 保守されていない
実装 利用者識別
説明 Provides login with a XenForo account in a configurable XenForo forum.
作者 Florian Schmidt (Florianschmidtwelzowトーク)
最新バージョン 0.1.0
MediaWiki 1.27+
PHP 5.5+
データベースの変更 はい
Composer mediawiki/xenforoauth
ライセンス MIT ライセンス
ダウンロード
  • $wgXenForoAuthButtonIcon
  • $wgXenForoAuthAutoCreate
  • $wgXenForoAuthBaseUrl
  • $wgXenForoAuthClientId
  • $wgXenForoAuthClientSecret
Quarterly downloads 3 (Ranked 146th)
translatewiki.net で翻訳を利用できる場合は、XenForoAuth 拡張機能の翻訳にご協力ください

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という名前のディレクトリ内に配置します。
    開発者とコード寄稿者は、上記の代わりに以下を使用してGitからインストールします:cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/XenForoAuth
  • 以下のコードを LocalSettings.php ファイルの末尾に追加します:
    wfLoadExtension( 'XenForoAuth' );
    
  • 更新スクリプトを実行します。このスクリプトは、この拡張機能が必要とするデータベーステーブルを自動的に作成します。
  • Configure the required parameters
  •   完了 – ウィキの「Special:Version」に移動して、拡張機能が正しくインストールされたことを確認します。

設定

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/';

Additional Configuration parameter

Configuration variable 既定値 説明
$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 a 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.

API クライアント向けの設定

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).