public function validateAccountActivationToken()
    {
        $username = $this->httpRequest()->post('username');
        $accountActivationToken = $this->httpRequest()->post('accountActivationToken');

        $result = $this->getLoginInstance()->validateAccountConfirmationToken($username, $accountActivationToken);
        if ($result) {
            return ['result' => 'success'];
        } else {
            throw new RestErrorException('Account activation error.', 'The provided token is not valid.');
        }
    }