MediaWiki master
|
Value object representing a MediaWiki edit token for logged-out users. More...
Inherits MediaWiki\Session\Token.
Public Member Functions | |
__construct () | |
match ( $userToken, $maxAge=null) | |
Test if the token-string matches this token. | |
![]() | |
__construct ( $secret, $salt, $new=false) | |
__toString () | |
toString () | |
Get the string representation of the token. | |
wasNew () | |
Indicate whether this token was just created. | |
Protected Member Functions | |
toStringAtTimestamp ( $timestamp) | |
Get the string representation of the token at a timestamp. | |
Additional Inherited Members | |
![]() | |
static | getTimestamp ( $token) |
Decode the timestamp from a token string. | |
![]() | |
const | SUFFIX = '+\\' |
CSRF token suffix. | |
Value object representing a MediaWiki edit token for logged-out users.
This exists so that code generically dealing with MediaWiki\Session\Token (i.e. the API) doesn't have to have so many special cases for anon edit tokens.
Definition at line 36 of file LoggedOutEditToken.php.
MediaWiki\User\LoggedOutEditToken::__construct | ( | ) |
Definition at line 41 of file LoggedOutEditToken.php.
MediaWiki\User\LoggedOutEditToken::match | ( | $userToken, | |
$maxAge = null ) |
Test if the token-string matches this token.
string | null | $userToken | |
int | null | $maxAge | Return false if $userToken is older than this many seconds |
Reimplemented from MediaWiki\Session\Token.
Definition at line 49 of file LoggedOutEditToken.php.
References MediaWiki\Session\Token\SUFFIX.
|
protected |
Get the string representation of the token at a timestamp.
int | $timestamp |
Reimplemented from MediaWiki\Session\Token.
Definition at line 45 of file LoggedOutEditToken.php.
References MediaWiki\Session\Token\SUFFIX.