2017 © Pedro Peláez
 

library token

Simple Token Class

image

flextype-components/token

Simple Token Class

  • Thursday, April 5, 2018
  • by Awilum
  • Repository
  • 1 Watchers
  • 1 Stars
  • 21 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Token Component

versionMIT License, (*1)

The Token component generate and store a unique token which can be used to help prevent CSRF attacks., (*2)

Installation

composer require flextype-components/token

Usage

Generate token, (*3)

use Flextype\Component\Token\Token;

$token = Token::generate();

Generate token in the template, (*4)

<?php use Flextype\Component\Token\Token; ?>
<input type="hidden" name="csrf" value="<?php echo Token::generate(); ?>">

Check that the given token matches the currently stored security token., (*5)

use Flextype\Component\Token\Token;

if (Token::check($token)) {
    // Pass
}

License

See LICENSE, (*6)

The Versions

05/04 2018

dev-master

9999999-dev https://github.com/flextype-components/token

Simple Token Class

  Sources   Download

MIT

The Requires

 

token

05/04 2018

v1.1.0

1.1.0.0 https://github.com/flextype-components/token

Simple Token Class

  Sources   Download

MIT

The Requires

 

token

04/04 2018

v1.0.3

1.0.3.0 https://github.com/flextype-components/token

Simple Token Class

  Sources   Download

MIT

The Requires

 

token

27/10 2015

v1.0.2

1.0.2.0 https://github.com/force-components/Token/issues

Simple Token Class

  Sources   Download

MIT

The Requires

 

token