2017 © Pedro Peláez
 

library security

Simple security component for Nice applications

image

nice/security

Simple security component for Nice applications

  • Thursday, December 11, 2014
  • by tyler-sommer
  • Repository
  • 1 Watchers
  • 1 Stars
  • 1,612 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 9 % Grown

The README.md

security

Simple security component for Nice applications., (*1)

View the full documentation online., (*2)

Installation

Install the nice/security package using Composer., (*3)

From your project root directory, run:, (*4)

composer require nice/security:1.0.x-dev

This command will add nice/security package to your composer.json and then install the necessary files., (*5)

Usage

nice/security includes a default authenticator, Nice\Security\Authenticator\SimpleAuthenticator. This authenticator uses the PHP 5.5 password_* API, falling back to ircmaxell's password_compat library on PHP 5.4., (*6)

You must hash your password prior to using nice/security. This can be done through the included hashpass.php utility., (*7)

Full source code to hashpass.php:, (*8)

<?php

(@include_once __DIR__ . '/../vendor/autoload.php') || @include_once __DIR__ . '/../../../autoload.php';

$in = fopen('php://stdin', 'r');

echo "Enter password to hash: ";

$pass = fgets($in);
// trim newline
$pass = substr($pass, 0, strlen($pass) - 1);

$hash = password_hash($pass, PASSWORD_DEFAULT);

echo "Hashed result:\n";
echo $hash."\n\n";

This utility is automatically installed in your vendor/bin directory by Composer., (*9)

Run it:, (*10)

vendor/bin/hashpass

The Versions

11/12 2014

dev-master

9999999-dev

Simple security component for Nice applications

  Sources   Download

MIT

The Requires

 

The Development Requires

11/12 2014

1.0.0

1.0.0.0

Simple security component for Nice applications

  Sources   Download

MIT

The Requires

 

The Development Requires