MediaWiki  1.34.0
LoggedOutEditToken.php
Go to the documentation of this file.
1 <?php
25 
35 class LoggedOutEditToken extends Token {
36  public function __construct() {
37  parent::__construct( '', '', false );
38  }
39 
40  protected function toStringAtTimestamp( $timestamp ) {
41  return self::SUFFIX;
42  }
43 
44  public function match( $userToken, $maxAge = null ) {
45  return $userToken === self::SUFFIX;
46  }
47 }
LoggedOutEditToken\toStringAtTimestamp
toStringAtTimestamp( $timestamp)
Get the string representation of the token at a timestamp.
Definition: LoggedOutEditToken.php:40
LoggedOutEditToken\match
match( $userToken, $maxAge=null)
Test if the token-string matches this token.
Definition: LoggedOutEditToken.php:44
LoggedOutEditToken
Value object representing a logged-out user's edit token.
Definition: LoggedOutEditToken.php:35
MediaWiki\Session\Token\SUFFIX
const SUFFIX
CSRF token suffix.
Definition: Token.php:36
LoggedOutEditToken\__construct
__construct()
Definition: LoggedOutEditToken.php:36
MediaWiki\Session\Token
Value object representing a CSRF token.
Definition: Token.php:32