MediaWiki master
LoggedOutEditToken.php
Go to the documentation of this file.
1<?php
21namespace MediaWiki\User;
22
24
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
55class_alias( LoggedOutEditToken::class, 'LoggedOutEditToken' );
Value object representing a CSRF token.
Definition Token.php:34
const SUFFIX
CSRF token suffix.
Definition Token.php:38
Value object representing a MediaWiki edit token for logged-out users.
match( $userToken, $maxAge=null)
Test if the token-string matches this token.
toStringAtTimestamp( $timestamp)
Get the string representation of the token at a timestamp.