library csrf
Anti-CSRF module for Infuse Framework
infuse/csrf
Anti-CSRF module for Infuse Framework
- PHP
- 1 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 3 Versions
- 3 % Grown
csrf
, (*1)
CSRF protection for Infuse Framework. Built on symfony/security-csrf., (*2)
Installation
-
Install the package with composer:, (*3)
composer require infuse/csrf
-
Add the services in your app's configuration:, (*4)
'services' => [
// ...
'csrf' => 'Infuse\Csrf\Csrf',
'csrf_tokens' => 'Infuse\Csrf\CsrfTokens',
// ...
]
-
Add the middleware to your app:, (*5)
$app->middleware($app['csrf']);
Usage
Any POST, PUT, PATCH, and DELETE request that has the middleware installed will check for a valid CSRF token. With a line of code you can add CSRF tokens to a form (Smarty example):, (*6)
<form action="/transfer" method="POST">
{$app.csrf->render($req) nofilter}
<!-- rest of your form... -->
</form>
dev-master
9999999-dev
Anti-CSRF module for Infuse Framework
Sources
Download
MIT
The Requires
The Development Requires
framework
security
csrf
infuse
1.1
1.1.0.0
Anti-CSRF module for Infuse Framework
Sources
Download
MIT
The Requires
The Development Requires
framework
security
csrf
infuse
1.0
1.0.0.0
Anti-CSRF module for Infuse Framework
Sources
Download
MIT
The Requires
The Development Requires
framework
security
csrf
infuse