MediaWiki master
LoggedOutEditToken.php
Go to the documentation of this file.
1<?php
24namespace MediaWiki\User;
25
27
40
44 public function __construct() {
45 parent::__construct( '', '', false );
46 }
47
48 protected function toStringAtTimestamp( $timestamp ) {
49 return self::SUFFIX;
50 }
51
52 public function match( $userToken, $maxAge = null ) {
53 return $userToken === self::SUFFIX;
54 }
55}
56
58class_alias( LoggedOutEditToken::class, 'LoggedOutEditToken' );
Value object representing a CSRF token.
Definition Token.php:32
const SUFFIX
CSRF token suffix.
Definition Token.php:36
Value object representing a logged-out user's edit token.
match( $userToken, $maxAge=null)
Test if the token-string matches this token.
toStringAtTimestamp( $timestamp)
Get the string representation of the token at a timestamp.
Utility class for bot passwords.