mediawiki-extensions-OATHAuth/includes/auth/TOTPAuthenticationRequest.php
Kunal Mehta 7451a5df33 Move classes to includes/
Change-Id: I2d2a917e5a22f88dc644eb3c33f775642728e1f4
2018-04-09 00:51:39 -07:00

28 lines
758 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 [
'OATHToken' => [
'type' => 'string',
'label' => wfMessage( 'oathauth-auth-token-label' ),
'help' => wfMessage( 'oathauth-auth-token-help' ), ], ];
}
}