2017 © Pedro Peláez
 

library tokenizer

Create and validate token for user data

image

sincco/tokenizer

Create and validate token for user data

  • Wednesday, May 18, 2016
  • by ivanmiranda
  • Repository
  • 1 Watchers
  • 0 Stars
  • 91 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 5 % Grown

The README.md

tokenizer

Create and validate token for user data. This tool simplifies the creation and validation for token with user data, the resulting string can be used as a URL parameter., (*1)

Installation

To add this package as a local, per-project dependency to your project, simply add a dependency on phpunit/php-token-stream to your project's composer.json file. Here is a minimal example of a composer.json file that just defines a dependency on Tokenizer:, (*2)

{
    "require": {
        "sincco/tokenizer": "~1.0"
    }
}

Use

Creation

<?php
require_once __DIR__ . '/vendor/autoload.php';
use \Sincco\Tools;

$userData = [ 'idUser'=>666, 'emailUser'=>'ivan.miranda@sincco.com' ];
$password = "p4$sw0rD";
$minutesExpiration = 10;
echo Tokenizer::create( $userData, $password, $minutesExpiration );

Validation

<?php
require_once __DIR__ . '/vendor/autoload.php';
use \Sincco\Tools;

$password = "p4$sw0rD";
$valid = Tokenizer::validate( $token, $password );

NOTICE OF LICENSE

This source file is subject to the Open Software License (OSL 3.0) that is available through the world-wide-web at this URL: http://opensource.org/licenses/osl-3.0.php, (*3)

Happy coding! - ivan miranda, (*4)

The Versions

18/05 2016

dev-master

9999999-dev

Create and validate token for user data

  Sources   Download

MIT

The Requires

  • php ^5.3.3 || ^7.0

 

token tokenizer sfphp sincco

18/05 2016

1.0

1.0.0.0

Create and validate token for user data

  Sources   Download

MIT

The Requires

  • php ^5.3.3 || ^7.0

 

token tokenizer sfphp sincco