2017 © Pedro Peláez
 

plugin cradle-csrf

CSRF handler for Cradle

image

cblanquera/cradle-csrf

CSRF handler for Cradle

  • Monday, March 12, 2018
  • by cblanquera
  • Repository
  • 1 Watchers
  • 0 Stars
  • 4,081 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 15 % Grown

The README.md

Deprecation Notice: This project has been moved to https://github.com/CradlePHP/cradle-csrf, (*1)

cradle-csrf

CSRF Handling for Cradle, (*2)

1. Requirements

You should be using CradlePHP currently at dev-master. See https://cradlephp.github.io/ for more information., (*3)

2. Install

composer require cblanquera/cradle-csrf

Then in /bootstrap.php, add, (*4)

->register('cblanquera/cradle-csrf')

3. Recipes

Once the database is installed open up /public/index.php and add the following., (*5)

<?php

use Cradle\Framework\Flow;

return cradle()
    //add routes here
    ->get('/csrf/test', 'CSRF Page')
    ->post('/csrf/test', 'CSRF Process')

    //add flows here
    //renders a table display
    ->flow('CSRF Page',
        Flow::csrf()->load,
        Flow::csrf()->render,
        'TODO: form page'
    )
    ->flow('CSRF Process',
        Flow::csrf()->check,
        array(
            Flow::csrf()->yes,
            'TODO: process'
        ),
        array(
            Flow::csrf()->no,
            'TODO: deny'
        )
    );

The Versions

12/03 2018

dev-master

9999999-dev

CSRF handler for Cradle

  Sources   Download

MIT

The Requires

 

The Development Requires

by Christian Blanquera

cradle cradlephp