Hi!
Have this code in App/Providers/SHA512HashServiceProvider.php
public function register() {
$this->app->singleton('hash', function () {
abort(200, 'in singleton');
return new SHA512Hasher();
});
abort(200, 'after clojure');
}
abort on "after clojure" is executed, but not in clojure, of course with commenting * abort(200, 'after clojure'); *
And password checking with bcrypt, not my sha512.
What i doing wrong?
Another code in app.php
/*
|--------------------------------------------------------------------------
| Register Service Providers
|--------------------------------------------------------------------------
|
| Here we will register all of the application's service providers which
| are used to bind services into the container. Service providers are
| totally optional, so you are not required to uncomment this line.
|
*/
// $app->register(App\Providers\AppServiceProvider::class);
$app->register(App\Providers\AuthServiceProvider::class);
// $app->register(App\Providers\EventServiceProvider::class);
$app->register(App\Providers\SHA512HashServiceProvider::class);
UPDATE:
After debug in $this->app->singleton i found that
17-Jan-2018 08:42:23 log abstarct=League\OAuth2\Server\AuthorizationServer log backtrace=
17-Jan-2018 08:42:23 log abstarct=League\OAuth2\Server\ResourceServer log backtrace=
17-Jan-2018 08:42:23 log abstarct=Illuminate\Database\Connection log backtrace=
*** 17-Jan-2018 08:42:23 SHA512 REG ***
Registering my hasher ***17-Jan-2018 08:42:23 log abstarct=hash log backtrace= ***
17-Jan-2018 08:42:23 log abstarct=encrypter log backtrace=
17-Jan-2018 08:42:23 log abstarct=encrypter log backtrace=
Framework registering Application\registerHashBindings *** 17-Jan-2018 08:42:23 log abstarct=hash log backtrace= ***
Framework registering Illuminate\Hashing\HashServiceProvider *** 17-Jan-2018 08:42:23 log abstarct=hash log backtrace=****
17-Jan-2018 08:42:23 log abstarct=Psr\Http\Message\ServerRequestInterface log backtrace=
HashServiceProvider is BCrypt registration, so this is rewrite my hashing.