2017 © Pedro Peláez
 

library laravel-query-signer

Query signer for the Laravel 5

image

bonecms/laravel-query-signer

Query signer for the Laravel 5

  • Tuesday, July 10, 2018
  • by igoshev
  • Repository
  • 1 Watchers
  • 0 Stars
  • 2 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Simple query signer for Laravel

Supported versions: 5.6 and above, (*1)

Installing query signer

Note: If you do not have Composer yet, you can install it by following the instructions on https://getcomposer.org, (*2)

Install package

composer require bonecms/laravel-query-signer

Using query signer

Generate signature:, (*3)

<?php 

use Bone\Signer\Facades\Signer;

$array = [
    5,
    'string' => 'example',
    'array'  => [
        'example'
    ]
];

$sign = Signer::sign($array);

Check Signature:, (*4)

<?php 

use Bone\Signer\Facades\Signer;

$array = [
    5,
    'string' => 'example',
    'array'  => [
        'example'
    ]
];
$sign = '$2y$10$wDtYOVXK5J9XCD6Vx.taNevviw5aVsVp1rBrkpaB.9xLwHHORgqya';

$verified = Signer::verify($array, $sign);
if ($verified) {
    // do something
}

Configuration

php artisan vendor:publish --tag=bone-data-signer-config
<?php

return [
    /*
    |--------------------------------------------------------------------------
    | Passphrase
    |--------------------------------------------------------------------------
    | The passphrase that will be added to the row for hashing.
    */
    'passphrase' => env('SIGNER_PASSPHRASE', 'Your super secret passphrase'),

    /*
    |--------------------------------------------------------------------------
    | Cost
    |--------------------------------------------------------------------------
    | Cost which denotes the algorithmic cost that should be used.
    */
    'cost' => env('SIGNER_COST', 10),
];

The Versions

10/07 2018

dev-master

9999999-dev https://github.com/igoshev/laravel-query-signer

Query signer for the Laravel 5

  Sources   Download

MIT

The Requires

 

by Dmitriy Igoshev

signer query signer request signer

10/07 2018

1.0

1.0.0.0 https://github.com/igoshev/laravel-query-signer

Query signer for the Laravel 5

  Sources   Download

MIT

The Requires

 

by Dmitriy Igoshev

signer query signer request signer