nextras/secured-links

Package secures Nette Framework signals against CSRF attack.

Installs: 11 642

Dependents: 6

Stars: 37

Watchers: 12

Forks: 5

Open Issues: 2

Language: PHP

v1.3.1 2015-06-21 16:18 UTC

README

Build Status Downloads this Month Stable version HHVM Status

SecuredLinksTrait creates secured signal links. PHP 5.4+ ONLY

Installation

The best way to install is using Composer:

$ composer require nextras/secured-links

Usage of SecuredLinksTrait

abstract class BasePrenseter extends Nette\Application\UI\Presenter
{
    use Nextras\Application\UI\SecuredLinksPresenterTrait;
}


class MyPresenter extends BasePresenter
{
    /**
     * @secured
     */
    public function handleDelete($id)
    {
    }
}


abstract class BaseControl extends Nette\Application\UI\Control
{
    use Nextras\Application\UI\SecuredLinksControlTrait;
}


class MyControl extends BaseControl
{
    /**
     * @secured
     */
    public function handleDelete($id)
    {
    }
}