Page MenuHomeWickedGov Phorge

HCaptchaAuthenticationRequest.php
No OneTemporary

Size
1015 B
Referenced Files
None
Subscribers
None

HCaptchaAuthenticationRequest.php

<?php
namespace MediaWiki\Extension\ConfirmEdit\hCaptcha;
use MediaWiki\Auth\AuthenticationRequest;
use MediaWiki\Extension\ConfirmEdit\Auth\CaptchaAuthenticationRequest;
use MediaWiki\MediaWikiServices;
class HCaptchaAuthenticationRequest extends CaptchaAuthenticationRequest {
public function __construct() {
parent::__construct( '', [] );
}
/** @inheritDoc */
public function loadFromSubmission( array $data ) {
// unhack the hack in parent
return AuthenticationRequest::loadFromSubmission( $data );
}
/** @inheritDoc */
public function getFieldInfo() {
$ret = [
'captchaWord' => [
'type' => 'string',
],
];
// Only display if there's potentially a captcha to solve or interact with...
if ( !MediaWikiServices::getInstance()->getMainConfig()->get( 'HCaptchaPassiveMode' ) ) {
$fieldInfo = parent::getFieldInfo();
$ret['captchaWord']['label'] = $fieldInfo['captchaWord']['label'];
$ret['captchaWord']['help'] = \wfMessage( 'hcaptcha-help' );
}
return $ret;
}
}

File Metadata

Mime Type
text/x-php
Expires
Oct 4 2026, 21:28 (6 w, 9 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
80/60/e29ca80e1b47b4d37765603192dc
Default Alt Text
HCaptchaAuthenticationRequest.php (1015 B)

Event Timeline