mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/OATHAuth
synced 2024-12-01 19:36:24 +00:00
03d890f3da
* Spelling in OATHAuthHooks::onRegistration comment * Remove incorrect comment for OATHAuth::__construct * Spelling in TOTPAuthenticationRequest class phpdoc Change-Id: Iaf670a1b86e82b4684489371c8152b8055bff90e
30 lines
773 B
PHP
30 lines
773 B
PHP
<?php
|
|
|
|
use MediaWiki\Auth\AuthenticationRequest;
|
|
|
|
/**
|
|
* AuthManager value object for the TOTP second factor of an authentication:
|
|
* a pseudorandom token that is generated from the current time independently
|
|
* by the server and the client.
|
|
*/
|
|
class TOTPAuthenticationRequest extends AuthenticationRequest {
|
|
public $OATHToken;
|
|
|
|
public function describeCredentials() {
|
|
return [
|
|
'provider' => wfMessage( 'oathauth-describe-provider' ),
|
|
'account' => new \RawMessage( '$1', [ $this->username ] ),
|
|
] + parent::describeCredentials();
|
|
}
|
|
|
|
public function getFieldInfo() {
|
|
return array(
|
|
'OATHToken' => array(
|
|
'type' => 'string',
|
|
'label' => wfMessage( 'oathauth-auth-token-label' ),
|
|
'help' => wfMessage( 'oathauth-auth-token-help' ),
|
|
),
|
|
);
|
|
}
|
|
}
|