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