Simple Hash Authenticator for Nette Framework
PHP
Latest commit 8961ec3 Dec 29, 2014 @Vrtak-CZ Vrtak-CZ update Coding Standard
Permalink
Failed to load latest commit information.
src/Nella/SimpleHashAuthenticator update Coding Standard Dec 29, 2014
tests update Coding Standard Dec 29, 2014
.gitattributes Init authenticator Oct 4, 2014
.gitignore Init authenticator Oct 4, 2014
.travis.yml
LICENSE.md Init authenticator Oct 4, 2014
README.md new badges icons Dec 28, 2014
composer.json update Coding Standard Dec 29, 2014

README.md

Simple hash authenticator for Nette Framework

Build Status SensioLabsInsight Status Latest Stable Version Composer Downloads Dependency Status HHVM Status

Installation

composer require nella/simple-hash-authenticator

Usage


$authenticator = new \Nella\SimpleHashAuthenticator\Authenticator(array(
    'demo' => '$2y$10$l5cjVRLvK2mjm6hzj8.s8.yjXmtO0Eio0JNt.JwAbZccndN9m1IVi', // hash of 'test'
), array(
    'demo' => array(
        'admin'
    ),
));

/** @var \Nette\Security\User $user */
$user->setAuthenticator($authenticator);

or register extension

extensions:
    authenticator: Nella\SimpleHashAuthenticator\Extension

authenticator:
    users:
        demo:
            password: '$2y$10$l5cjVRLvK2mjm6hzj8.s8.yjXmtO0Eio0JNt.JwAbZccndN9m1IVi'
            roles:
                - admin

# or without roles

authenticator:
    users:
        demo: '$2y$10$l5cjVRLvK2mjm6hzj8.s8.yjXmtO0Eio0JNt.JwAbZccndN9m1IVi'

For hash generator:

authenticator:
    router: @router # or your router service name

and go to http://yourweb.local/authenticator

License

Simple hash authenticator for Nette Framework is licensed under the MIT License - see the LICENSE file for details