MediaWiki
master
LoggedOutEditToken.php
Go to the documentation of this file.
1
<?php
21
namespace
MediaWiki\User
;
22
23
use
MediaWiki\Session\Token
;
24
36
class
LoggedOutEditToken
extends
Token
{
37
41
public
function
__construct
() {
42
parent::__construct(
''
,
''
,
false
);
43
}
44
45
protected
function
toStringAtTimestamp
( $timestamp ) {
46
return
self::SUFFIX
;
47
}
48
49
public
function
match
( $userToken, $maxAge =
null
) {
50
return
$userToken ===
self::SUFFIX
;
51
}
52
}
53
55
class_alias( LoggedOutEditToken::class,
'LoggedOutEditToken'
);
MediaWiki\Session\Token
Value object representing a CSRF token.
Definition
Token.php:34
MediaWiki\Session\Token\SUFFIX
const SUFFIX
CSRF token suffix.
Definition
Token.php:38
MediaWiki\User\LoggedOutEditToken
Value object representing a MediaWiki edit token for logged-out users.
Definition
LoggedOutEditToken.php:36
MediaWiki\User\LoggedOutEditToken\match
match( $userToken, $maxAge=null)
Test if the token-string matches this token.
Definition
LoggedOutEditToken.php:49
MediaWiki\User\LoggedOutEditToken\__construct
__construct()
Definition
LoggedOutEditToken.php:41
MediaWiki\User\LoggedOutEditToken\toStringAtTimestamp
toStringAtTimestamp( $timestamp)
Get the string representation of the token at a timestamp.
Definition
LoggedOutEditToken.php:45
MediaWiki\User
Definition
ActorCache.php:21
includes
user
LoggedOutEditToken.php
Generated on Tue Jan 7 2025 20:25:22 for MediaWiki by
1.10.0