MediaWiki master
LoggedOutEditToken.php
Go to the documentation of this file.
1<?php
7namespace MediaWiki\User;
8
10
23
27 public function __construct() {
28 parent::__construct( '', '', false );
29 }
30
32 protected function toStringAtTimestamp( $timestamp ) {
33 return self::SUFFIX;
34 }
35
37 public function match( $userToken, $maxAge = null ) {
38 return $userToken === self::SUFFIX;
39 }
40}
41
43class_alias( LoggedOutEditToken::class, 'LoggedOutEditToken' );
Value object representing a CSRF token.
Definition Token.php:19
const SUFFIX
CSRF token suffix.
Definition Token.php:23
Value object representing a MediaWiki edit token for logged-out users.
match( $userToken, $maxAge=null)
Test if the token-string matches this token.bool
toStringAtTimestamp( $timestamp)
Get the string representation of the token at a timestamp.string