Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\Repo\Interactors\TokenCheckInteractor Class Reference

Interactor for checking edit tokens. More...

Public Member Functions

 __construct (User $user)
 
 checkRequestToken (WebRequest $request, $tokenParam, $salt=null)
 Check the token sent via the given web request.
 

Private Attributes

 $user
 

Detailed Description

Interactor for checking edit tokens.

Author
Daniel Kinzler

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Repo\Interactors\TokenCheckInteractor::__construct ( User  $user)

Member Function Documentation

◆ checkRequestToken()

Wikibase\Repo\Interactors\TokenCheckInteractor::checkRequestToken ( WebRequest  $request,
  $tokenParam,
  $salt = null 
)

Check the token sent via the given web request.

Parameters
WebRequest$request
string$tokenParam
string | null$saltsee User::matchEditToken
Exceptions
TokenCheckExceptionIf the token is not valid. The following error codes may be used with the TokenCheckException: "missingtoken" if no token was sent, "mustposttoken" if the token was not sent via POST, and "badtoken" if the token mismatches (e.g. when session data was lost).

Member Data Documentation

◆ $user

Wikibase\Repo\Interactors\TokenCheckInteractor::$user
private

The documentation for this class was generated from the following file: