MediaWiki master
TokenAwareHandlerTrait.php File Reference

Go to the source code of this file.

Namespaces

namespace  MediaWiki
 A helper class for throttling authentication attempts.
 
namespace  MediaWiki\Rest
 

Functions

 MediaWiki\Rest::getBadTokenMessage ()
 Returns a standard error message to use when the given CSRF token is invalid.
 
 MediaWiki\Rest::getSession ()
 
 MediaWiki\Rest::getToken ()
 Determines the CSRF token to be used, possibly taking it from a request parameter.
 
 MediaWiki\Rest::getTokenParamDefinition ()
 Returns the definition for the token parameter, to be used in getBodyValidator().
 
 MediaWiki\Rest::needsToken ()
 Determines whether a CSRF token is needed.
 
 MediaWiki\Rest::validateToken (bool $allowAnonymousToken=false)
 Checks that the given CSRF token is valid (or the used authentication method does not require CSRF).
 

Variables

trait MediaWiki\Rest::TokenAwareHandlerTrait