扩展:LoginNotify

From mediawiki.org
This page is a translated version of the page Extension:LoginNotify and the translation is 44% complete.
Outdated translations are marked like this.
此扩展随附于MediaWiki 1.40及更高版本。 因此您无需另外下载。 但是,您仍需遵循此页面提供的其他使用说明。
MediaWiki扩展手册
LoginNotify
发行状态: 稳定版
实现 用户活动
描述 通知用户有可疑登录
作者 Brian Wolff (Bawolff留言)
最新版本 0.1
MediaWiki >= 1.42
数据库更改
Composer mediawiki/loginnotify
loginnotify_seen_net
许可协议 MIT授權條款
下載
  • $wgLoginNotifySeenBucketSize
  • $wgLoginNotifyExpiryNewIP
  • $wgLoginNotifyExpiryKnownIP
  • $wgLoginNotifyEnableOnSuccess
  • $wgLoginNotifyUseSeenTable
  • $wgLoginNotifyAttemptsKnownIP
  • $wgLoginNotifyCacheLoginIPExpiry
  • $wgLoginNotifyCookieExpire
  • $wgLoginNotifyUseCentralId
  • $wgLoginNotifyCookieDomain
  • $wgLoginNotifyUseCheckUser
  • $wgLoginNotifySeenExpiry
  • $wgLoginNotifyMaxCookieRecords
  • $wgLoginNotifyAttemptsNewIP
  • $wgLoginNotifyCheckKnownIPs
  • $wgLoginNotifySecretKey
季度下載量 36 (Ranked 113rd)
正在使用的公开wiki数 904 (Ranked 277th)
前往translatewiki.net翻譯LoginNotify扩展
問題 开启的任务 · 报告错误

The LoginNotify extension notifies you when someone logs into your account. It can be configured to give warnings after a certain number of failed login attempts (The number is configurable, and can be different between unknown IPs/devices and known IPs/devices). It can also give 扩展:Echo notices (which can also be emailed) for successful logins from IPs you don't normally use. It can optionally integrate into the CheckUser extension in order to determine if the login is from an IP address you don't normally use. It can also set a cookie to try and determine if the login is from a device you normally use.

安裝

此扩展需要安装Echo扩展。

  • 下载文件,并将其放置在您extensions/文件夹中的LoginNotify目录内。
    开发者和代码贡献人员应从Git安装扩展,输入:cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/LoginNotify
  • 将下列代码放置在您的LocalSettings.php 的底部:
    wfLoadExtension( 'LoginNotify' );
    
  • 按需求配置。
  • Yes 完成 – 在您的wiki上导航至Special:Version,以验证已成功安装扩展。

This extension can optionally integrate with the CheckUser extension if it is installed, but does not require it.

用法

Once LoginNotify is installed, whenever a user logs into the wiki, their IP subnet is cached on the server and a cookie named loginnotify_prevlogins is stored in their browser. These tokens, optionally along with CheckUser tables, are used to see if subsequent logins are coming from a known IP/device.

If CentralAuth and CheckUser are installed, it will check the IP not only for the current wiki, but also the ten wikis where the user is most active.

配置

可以设置的参数(在“LocalSettings.php”中):

名称 描述 默认
$wgLoginNotifyAttemptsKnownIP 在触发通知之前,从已知IP允许的失败登录尝试次数。 10
$wgLoginNotifyAttemptsNewIP 触发通知之前,允许新IP的失败登录尝试次数。 3
$wgLoginNotifyExpiryKnownIP The time-to-live of the count of failed login attempts from a known IP (from the time of the first failed attempt). 604800 (7天)
$wgLoginNotifyExpiryNewIP The time-to-live of the count of failed login attempts from a new IP (from the time of the first failed attempt). 1209600 (14天)
$wgLoginNotifyCheckKnownIPs 是否在已知IP成功失败后触发通知。 true
$wgLoginNotifyEnableOnSuccess 是否在未知IP成功登录后触发通知。 true
$wgLoginNotifyEnableForPriv 为不同的用户组设置不同的默认通知首选项。 For user groups that have any of the user rights listed in this array, the preferences specified in Hooks:getOverridenOptions() are on by default. ("Failed login attempts" web notifications and "Login from new computer" web notifications.) [ "editinterface", "userrights" ]
$wgLoginNotifySecretKey Use this key instead of $wgSecretKey to generate the HMACs for the cookie. null
$wgLoginNotifyCookieExpire Cookie到期。 15552000 (180天)
$wgLoginNotifyCookieDomain To allow sharing login cookies between sites on different subdomains, set this to the parent domain name. null
$wgLoginNotifyMaxCookieRecords Maximum number of users (records) to track as having successfully logged in on a particular device. 6
$wgLoginNotifyCacheLoginIPExpiry How long to cache IPs in memcache. Set to false to disable; set to 0 to cache forever. 5184000 (60天)