<?php

namespace Support;

use Tymon\JWTAuth\Providers\JWTAuthServiceProvider as BaseJWTAuthServiceProvider;

class JWTAuthServiceProvider extends BaseJWTAuthServiceProvider
{

    /**
     * Register the bindings for the main JWTAuth class
     */
    protected function registerJWTAuth()
    {
        $this->app['tymon.jwt.auth'] = $this->app->share(function ($app) {

            $auth = new JWTAuth(
                $app['tymon.jwt.manager'],
                $app['tymon.jwt.provider.user'],
                $app['tymon.jwt.provider.auth'],
                $app['request']
            );

            return $auth->setIdentifier($this->config('identifier'));
        });
    }
}
