public function evaluate($values)
    {
        $tokenService = $this->getServiceManager()->get(TokenService::SERVICE_ID);

        if($tokenService->checkToken($values)){
            $tokenService->revokeToken($values);
            return true;
        }

        \common_Logger::e('Attempt to post a form with the incorrect token');
        throw new \common_exception_Unauthorized('Invalid token '. $values);
    }
public function evaluate($values)
    {
        $tokenService = $this->getServiceManager()->get(TokenService::SERVICE_ID);

        if($tokenService->checkToken($values)){
            $tokenService->revokeToken($values);
            return true;
        }

        \common_Logger::e('Attempt to post a form with the incorrect token');
        throw new \common_exception_Unauthorized('Invalid token '. $values);
    }
public function evaluate ( $ values ) { $ tokenService = $ this -> getServiceManager ( ) -> get ( TokenService :: SERVICE_ID ) ; if ( $ tokenService -> checkToken ( $ values ) ) { $ tokenService -> revokeToken ( $ values ) ; return true ; } \ common_Logger :: e ( 'Attempt to post a form with the incorrect token' ) ; throw new \ common_exception_Unauthorized ( 'Invalid token ' . $ values ) ; }
Validate an active XSRF token.

@param string $values should be the token
@return boolean true only if valid
@throws \common_exception_Unauthorized if the token is not valid
Validate an active XSRF token .