/** * Register the bindings for the Payload Factory. */ protected function registerPayloadFactory() { $this->app['tymon.jwt.payload.factory'] = $this->app->share(function ($app) { $factory = new PayloadFactory($app['tymon.jwt.claim.factory'], $app['request'], $app['tymon.jwt.validators.payload']); return $factory->setTTL($this->config('ttl')); }); }
/** * Set the token ttl (in minutes). * * @param int $ttl * @return $this * @static */ public static function setTTL($ttl) { return \Tymon\JWTAuth\PayloadFactory::setTTL($ttl); }