$tokenObj = ApiQueryTokens::getToken(
$this->getUser(), $this->getRequest()->getSession(), $salts[$params['type']]
);
$tokenObj = ApiQueryTokens::getToken(
$this->getUser(), $this->getRequest()->getSession(), $salts[$params['type']]
);
if ( $tokenObj->match( $token, $maxage ) ) {
$res['result'] = 'valid';
} elseif ( $maxage !== null && $tokenObj->match( $token ) ) {
if ( $tokenObj->match( $token, $maxage ) ) {
$res['result'] = 'valid';
} elseif ( $maxage !== null && $tokenObj->match( $token ) ) {
ApiBase::PARAM_TYPE => array_keys( ApiQueryTokens::getTokenTypeSalts() ),
ApiBase::PARAM_REQUIRED => true,
ApiBase::PARAM_TYPE => array_keys( ApiQueryTokens::getTokenTypeSalts() ),
ApiBase::PARAM_REQUIRED => true,
ApiBase::PARAM_TYPE => 'string',
ApiBase::PARAM_REQUIRED => true,
ApiBase::PARAM_TYPE => 'string',
ApiBase::PARAM_REQUIRED => true,
'action=checktoken&type=csrf&token=123ABC'
=> 'apihelp-checktoken-example-simple',
'action=checktoken&type=csrf&token=123ABC'
=> 'apihelp-checktoken-example-simple',