2017 © Pedro Peláez
 

library laravel-nonce

Generete nonces

image

pafelin/laravel-nonce

Generete nonces

  • Wednesday, October 23, 2013
  • by pafelin
  • Repository
  • 1 Watchers
  • 5 Stars
  • 9,792 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 1 % Grown

The README.md

laravel4-nonces

This package is for creating nonces easily based on a unique string (action), (*1)

Usage

Add to /app/config/app.php, (*2)

'providers' => array(
    ....
    'Pafelin\LaravelNonce\NonceServiceProvider',
    ....
)

and to, (*3)

'aliases' => array(
    ....
    'Nonce' => 'Pafelin\LaravelNonce\NonceFacade',
);

When you want to generate a nonce, (*4)

$nonce = Nonce::generate('some_identification_string');

By default the lifetime of the nonce is 1 minute and the size 16 characters. You can change the configurations by first publishing the package with the command:, (*5)

php artisan config:publish pafelin/laravel-nonce

This command will create a new file in, (*6)

app/config/packages/pafelin/laravel-nonce/config.php

The file will look like this:, (*7)

<?php
return array(
    'nonceLife' => 60, //1 minute
    'length'    => 16
);

There are only two configurations. The first increase or decrease the life of the nonce and the second increase or decrease the size (length) of it. The values there are recommended., (*8)

Contact

The Versions

23/10 2013

dev-master

9999999-dev

Generete nonces

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Pavel Genov

generator laravel4 illuminate nonce