Git Product home page Git Product logo

phpass's Introduction

#PHPass Laravel

A PHPass integration to Laravel. This package overrides the default Eloquent Auth Driver and Hashing of Laravel and uses the PHPass password hashing and checking methods.

Installation

Install package through Composer.

"require": {
    "ksungcaya/phpass": "~1.0"
}

Then run composer update

$ composer update

Update app/config/app.php and include a reference to this package's service provider in the providers array.

'providers' => [
    'Ksungcaya\Phpass\PhpassServiceProvider'
]

Next is change the driver value to phpass in app/config/auth.php to let Laravel use the PHPass authentication methods.

Usage

Now that PHPass is installed in Laravel, you can now use the normal Auth and Hash methods.

Auth::attemp(array(
            'email'    => $email,
            'password' => $password
          )
      );

Hash::make('secret');
Hash::check('secret', $hashedPassword);

That's it!

Please refer to Laravel documentation on Security to know more about Authentication and Hash methods.

phpass's People

Contributors

ksungcaya avatar nikosv avatar

Stargazers

daniel liu avatar

Watchers

 avatar Eduard Stankovič avatar

phpass's Issues

Class '\[]' not found

Greetings!

I was wondering if someone can help me with this, I just added phpass package to my project, the Ksungcaya\Phpass\PhpassServiceProvider to my confi/app.php and changed the Auth driver to phpass in config/auth.php, but, when I try to do

Auth::attempt([
    'user_email' => Input::json()->get('email'),
    'user_pass' => Input::json()->get('password')]
);

The application responds with a 500 error with FatalErrorException in PhpassUserProvider.php line 126: Class '\[]' not found message, it looks like I'm not initializing something because that line tries to instantiate the user model, but I couldn't find out where do I have to pass the model's name...

Any hints?

Laravel 5

Hello there.

I was wondering... does it work with Laravel 5?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.