Extension:NetworkAuth

The NetworkAuth extension is intended to bind particular network addresses to specific users. When the wiki is accessed from a specific network address, he will be automatically logged in with the specified user name. When a wiki is configured not to allow anonymous read and/or write access, the extension can be used to grant read and write access for users from particular network addresses (e.g. from the intranet of a company).

Installation
$IP/extensions/NetworkAuth
 * 1) Create a new folder (directory) in the following location:
 * 1) Download the extension
 * 2) Copy the files in to the new NetworkAuth folder

Configuration
To configure the extension, set the following parameters in LocalSettings.php.

The configuration variable $wgNetworkAuthUsers is an array that can contain one or several arrays to configure what user is logged in when a wiki page is loaded from a specific network address. NetworkAuth only becomes active when a user is not logged in already. When NetworkAuth detects an attempt to load a page by an anonymous user, it will check whether the source IP address of the request is matched by any of the records in $wgNetworkAuthUsers. If it is, it will log in the specified user.

Example:

It might be a good idea not to use NetworkAuth to log in a normal user account, but a special user account instead that exists exclusively for this purpose (e.g. "NetworkAuthUser"). In that case, one can add this account to the variable $wgNetWorkAuthSpecialUsers. Users in this list do not get the normal list of Personal Urls. Instead, the PersonalUrls show:
 * that the user is logged via the NetworkAuth extension
 * the IP address of the user
 * a link to log out
 * a link to log in

Example: