protected final function checkCsrf()
    {
        $valid = false;
        
        $r = $this->request;
        
        if($r->getSession('assegai_csrf_token')
            && $r->post('csrf')
            && $r->getSession('assegai_csrf_token') == $r->post('csrf')) {
            $valid = true;
        }
        
        $this->request->killSession('assegai_csrf_token');
        return $valid;
    }