Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>A workaround is to extends Auth module in Laravel, to implement your hash solution from Symfony.<br> Rewriting <code>Auth::attempt()</code>, hashing your password the way you want to, will work.<br> Same for <code>Hash::X</code>, you have to rewrite a function in your <code>Auth</code> class to hash new users password same way.</p> <hr> <p>How you can implement your hash method :</p> <p>Create a library in a folder name <strong>libraries</strong> into <strong>app</strong>, then, create your <strong>ServiceProvider</strong> :</p> <p><strong>libraries\SymfonyHasherServiceProvider.php</strong></p> <pre><code>use Illuminate\Support\ServiceProvider; class SymfonyHasherServiceProvider extends ServiceProvider { public function register() { $this-&gt;app-&gt;bind('hash', function() { return new SymfonyHasher; }); } } </code></pre> <p>Then, create your hasher, that will be a copy of Symfony hash method :</p> <p><strong>libraries\SymfonyHasher.php</strong></p> <pre><code>class SymfonyHasher implements Illuminate\Hashing\HasherInterface { public function make($value, array $options = array()) { /* make your hash here */ } public function check($value, $hashedValue, array $options = array()) { return $hashedValue == $this-&gt;make($value); } } </code></pre> <p>Replace <strong>'Illuminate\Hashing\HashServiceProvider'</strong> with <strong>'SymfonyHasherServiceProvider'</strong> in the service providers array in <strong>app.php config</strong>, then add <strong>'app/libraries'</strong> to autoload classmap in composer.json</p> <p>I don't know how Symfony make hashes, so you have to search how Symfony make hashes abd implement it as you need to do.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload