Page MenuHomeWickedGov Phorge

ReCaptchaNoCaptchaAuthenticationRequest.php
No OneTemporary

Size
977 B
Referenced Files
None
Subscribers
None

ReCaptchaNoCaptchaAuthenticationRequest.php

<?php
namespace MediaWiki\Extension\ConfirmEdit\ReCaptchaNoCaptcha;
use MediaWiki\Auth\AuthenticationRequest;
use MediaWiki\Extension\ConfirmEdit\Auth\CaptchaAuthenticationRequest;
/**
* Authentication request for ReCaptcha v2. Unlike the parent class, no session storage is used,
* and there is no ID; Google provides a single proof string after successfully solving a captcha.
*/
class ReCaptchaNoCaptchaAuthenticationRequest 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() {
$fieldInfo = parent::getFieldInfo();
return [
'captchaWord' => [
'type' => 'string',
'label' => $fieldInfo['captchaInfo']['label'],
'help' => wfMessage( 'renocaptcha-help' ),
],
];
}
}

File Metadata

Mime Type
text/x-php
Expires
Aug 16 2026, 05:22 (15 w, 6 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
9c/1e/2a43ffd2321ad47af7b7cf34d1d1
Default Alt Text
ReCaptchaNoCaptchaAuthenticationRequest.php (977 B)

Event Timeline