One Hat Cyber Team
Your IP:
216.73.216.102
Server IP:
198.54.114.155
Server:
Linux server71.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64
Server Software:
LiteSpeed
PHP Version:
5.6.40
Create File
|
Create Folder
Execute
Dir :
~
/
home
/
fluxyjvi
/
public_html
/
assets
/
images
/
Edit File:
Providers.tar
AbstractServiceProvider.php 0000644 00000024123 15107366213 0012062 0 ustar 00 <?php /* * This file is part of jwt-auth. * * (c) Sean Tymon <tymon148@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Tymon\JWTAuth\Providers; use Illuminate\Support\ServiceProvider; use Namshi\JOSE\JWS; use Tymon\JWTAuth\Blacklist; use Tymon\JWTAuth\Claims\Factory as ClaimFactory; use Tymon\JWTAuth\Console\JWTGenerateSecretCommand; use Tymon\JWTAuth\Contracts\Providers\Auth; use Tymon\JWTAuth\Contracts\Providers\JWT as JWTContract; use Tymon\JWTAuth\Contracts\Providers\Storage; use Tymon\JWTAuth\Factory; use Tymon\JWTAuth\Http\Middleware\Authenticate; use Tymon\JWTAuth\Http\Middleware\AuthenticateAndRenew; use Tymon\JWTAuth\Http\Middleware\Check; use Tymon\JWTAuth\Http\Middleware\RefreshToken; use Tymon\JWTAuth\Http\Parser\AuthHeaders; use Tymon\JWTAuth\Http\Parser\InputSource; use Tymon\JWTAuth\Http\Parser\Parser; use Tymon\JWTAuth\Http\Parser\QueryString; use Tymon\JWTAuth\JWT; use Tymon\JWTAuth\JWTAuth; use Tymon\JWTAuth\JWTGuard; use Tymon\JWTAuth\Manager; use Tymon\JWTAuth\Providers\JWT\Lcobucci; use Tymon\JWTAuth\Providers\JWT\Namshi; use Tymon\JWTAuth\Validators\PayloadValidator; abstract class AbstractServiceProvider extends ServiceProvider { /** * The middleware aliases. * * @var array */ protected $middlewareAliases = [ 'jwt.auth' => Authenticate::class, 'jwt.check' => Check::class, 'jwt.refresh' => RefreshToken::class, 'jwt.renew' => AuthenticateAndRenew::class, ]; /** * Boot the service provider. * * @return void */ abstract public function boot(); /** * Register the service provider. * * @return void */ public function register() { $this->registerAliases(); $this->registerJWTProvider(); $this->registerAuthProvider(); $this->registerStorageProvider(); $this->registerJWTBlacklist(); $this->registerManager(); $this->registerTokenParser(); $this->registerJWT(); $this->registerJWTAuth(); $this->registerPayloadValidator(); $this->registerClaimFactory(); $this->registerPayloadFactory(); $this->registerJWTCommand(); $this->commands('tymon.jwt.secret'); } /** * Extend Laravel's Auth. * * @return void */ protected function extendAuthGuard() { $this->app['auth']->extend('jwt', function ($app, $name, array $config) { $guard = new JWTGuard( $app['tymon.jwt'], $app['auth']->createUserProvider($config['provider']), $app['request'] ); $app->refresh('request', $guard, 'setRequest'); return $guard; }); } /** * Bind some aliases. * * @return void */ protected function registerAliases() { $this->app->alias('tymon.jwt', JWT::class); $this->app->alias('tymon.jwt.auth', JWTAuth::class); $this->app->alias('tymon.jwt.provider.jwt', JWTContract::class); $this->app->alias('tymon.jwt.provider.jwt.namshi', Namshi::class); $this->app->alias('tymon.jwt.provider.jwt.lcobucci', Lcobucci::class); $this->app->alias('tymon.jwt.provider.auth', Auth::class); $this->app->alias('tymon.jwt.provider.storage', Storage::class); $this->app->alias('tymon.jwt.manager', Manager::class); $this->app->alias('tymon.jwt.blacklist', Blacklist::class); $this->app->alias('tymon.jwt.payload.factory', Factory::class); $this->app->alias('tymon.jwt.validators.payload', PayloadValidator::class); } /** * Register the bindings for the JSON Web Token provider. * * @return void */ protected function registerJWTProvider() { $this->registerNamshiProvider(); $this->registerLcobucciProvider(); $this->app->singleton('tymon.jwt.provider.jwt', function ($app) { return $this->getConfigInstance('providers.jwt'); }); } /** * Register the bindings for the Lcobucci JWT provider. * * @return void */ protected function registerNamshiProvider() { $this->app->singleton('tymon.jwt.provider.jwt.namshi', function ($app) { return new Namshi( new JWS(['typ' => 'JWT', 'alg' => $this->config('algo')]), $this->config('secret'), $this->config('algo'), $this->config('keys') ); }); } /** * Register the bindings for the Lcobucci JWT provider. * * @return void */ protected function registerLcobucciProvider() { $this->app->singleton('tymon.jwt.provider.jwt.lcobucci', function ($app) { return new Lcobucci( $this->config('secret'), $this->config('algo'), $this->config('keys') ); }); } /** * Register the bindings for the Auth provider. * * @return void */ protected function registerAuthProvider() { $this->app->singleton('tymon.jwt.provider.auth', function () { return $this->getConfigInstance('providers.auth'); }); } /** * Register the bindings for the Storage provider. * * @return void */ protected function registerStorageProvider() { $this->app->singleton('tymon.jwt.provider.storage', function () { return $this->getConfigInstance('providers.storage'); }); } /** * Register the bindings for the JWT Manager. * * @return void */ protected function registerManager() { $this->app->singleton('tymon.jwt.manager', function ($app) { $instance = new Manager( $app['tymon.jwt.provider.jwt'], $app['tymon.jwt.blacklist'], $app['tymon.jwt.payload.factory'] ); return $instance->setBlacklistEnabled((bool) $this->config('blacklist_enabled')) ->setPersistentClaims($this->config('persistent_claims')); }); } /** * Register the bindings for the Token Parser. * * @return void */ protected function registerTokenParser() { $this->app->singleton('tymon.jwt.parser', function ($app) { $parser = new Parser( $app['request'], [ new AuthHeaders, new QueryString, new InputSource, ] ); $app->refresh('request', $parser, 'setRequest'); return $parser; }); } /** * Register the bindings for the main JWT class. * * @return void */ protected function registerJWT() { $this->app->singleton('tymon.jwt', function ($app) { return (new JWT( $app['tymon.jwt.manager'], $app['tymon.jwt.parser'] ))->lockSubject($this->config('lock_subject')); }); } /** * Register the bindings for the main JWTAuth class. * * @return void */ protected function registerJWTAuth() { $this->app->singleton('tymon.jwt.auth', function ($app) { return (new JWTAuth( $app['tymon.jwt.manager'], $app['tymon.jwt.provider.auth'], $app['tymon.jwt.parser'] ))->lockSubject($this->config('lock_subject')); }); } /** * Register the bindings for the Blacklist. * * @return void */ protected function registerJWTBlacklist() { $this->app->singleton('tymon.jwt.blacklist', function ($app) { $instance = new Blacklist($app['tymon.jwt.provider.storage']); return $instance->setGracePeriod($this->config('blacklist_grace_period')) ->setRefreshTTL($this->config('refresh_ttl')); }); } /** * Register the bindings for the payload validator. * * @return void */ protected function registerPayloadValidator() { $this->app->singleton('tymon.jwt.validators.payload', function () { return (new PayloadValidator) ->setRefreshTTL($this->config('refresh_ttl')) ->setRequiredClaims($this->config('required_claims')); }); } /** * Register the bindings for the Claim Factory. * * @return void */ protected function registerClaimFactory() { $this->app->singleton('tymon.jwt.claim.factory', function ($app) { $factory = new ClaimFactory($app['request']); $app->refresh('request', $factory, 'setRequest'); return $factory->setTTL($this->config('ttl')) ->setLeeway($this->config('leeway')); }); } /** * Register the bindings for the Payload Factory. * * @return void */ protected function registerPayloadFactory() { $this->app->singleton('tymon.jwt.payload.factory', function ($app) { return new Factory( $app['tymon.jwt.claim.factory'], $app['tymon.jwt.validators.payload'] ); }); } /** * Register the Artisan command. * * @return void */ protected function registerJWTCommand() { $this->app->singleton('tymon.jwt.secret', function () { return new JWTGenerateSecretCommand; }); } /** * Helper to get the config values. * * @param string $key * @param string $default * @return mixed */ protected function config($key, $default = null) { return config("jwt.$key", $default); } /** * Get an instantiable configuration instance. * * @param string $key * @return mixed */ protected function getConfigInstance($key) { $instance = $this->config($key); if (is_string($instance)) { return $this->app->make($instance); } return $instance; } } LumenServiceProvider.php 0000644 00000001375 15107366213 0011403 0 ustar 00 <?php /* * This file is part of jwt-auth. * * (c) Sean Tymon <tymon148@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Tymon\JWTAuth\Providers; use Tymon\JWTAuth\Http\Parser\LumenRouteParams; class LumenServiceProvider extends AbstractServiceProvider { /** * {@inheritdoc} */ public function boot() { $this->app->configure('jwt'); $path = realpath(__DIR__.'/../../config/config.php'); $this->mergeConfigFrom($path, 'jwt'); $this->app->routeMiddleware($this->middlewareAliases); $this->extendAuthGuard(); $this->app['tymon.jwt.parser']->addParser(new LumenRouteParams); } } JWT/Provider.php 0000644 00000007207 15107366213 0007525 0 ustar 00 <?php /* * This file is part of jwt-auth. * * (c) Sean Tymon <tymon148@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Tymon\JWTAuth\Providers\JWT; use Illuminate\Support\Arr; abstract class Provider { const ALGO_HS256 = 'HS256'; const ALGO_HS384 = 'HS384'; const ALGO_HS512 = 'HS512'; const ALGO_RS256 = 'RS256'; const ALGO_RS384 = 'RS384'; const ALGO_RS512 = 'RS512'; const ALGO_ES256 = 'ES256'; const ALGO_ES384 = 'ES384'; const ALGO_ES512 = 'ES512'; /** * The secret. * * @var string */ protected $secret; /** * The array of keys. * * @var array */ protected $keys; /** * The used algorithm. * * @var string */ protected $algo; /** * Constructor. * * @param string $secret * @param string $algo * @param array $keys * @return void */ public function __construct($secret, $algo, array $keys) { $this->secret = $secret; $this->algo = $algo; $this->keys = $keys; } /** * Set the algorithm used to sign the token. * * @param string $algo * @return $this */ public function setAlgo($algo) { $this->algo = $algo; return $this; } /** * Get the algorithm used to sign the token. * * @return string */ public function getAlgo() { return $this->algo; } /** * Set the secret used to sign the token. * * @param string $secret * @return $this */ public function setSecret($secret) { $this->secret = $secret; return $this; } /** * Get the secret used to sign the token. * * @return string */ public function getSecret() { return $this->secret; } /** * Set the keys used to sign the token. * * @param array $keys * @return $this */ public function setKeys(array $keys) { $this->keys = $keys; return $this; } /** * Get the array of keys used to sign tokens with an asymmetric algorithm. * * @return array */ public function getKeys() { return $this->keys; } /** * Get the public key used to sign tokens with an asymmetric algorithm. * * @return string|null */ public function getPublicKey() { return Arr::get($this->keys, 'public'); } /** * Get the private key used to sign tokens with an asymmetric algorithm. * * @return string|null */ public function getPrivateKey() { return Arr::get($this->keys, 'private'); } /** * Get the passphrase used to sign tokens * with an asymmetric algorithm. * * @return string|null */ public function getPassphrase() { return Arr::get($this->keys, 'passphrase'); } /** * Get the key used to sign the tokens. * * @return string|null */ protected function getSigningKey() { return $this->isAsymmetric() ? $this->getPrivateKey() : $this->getSecret(); } /** * Get the key used to verify the tokens. * * @return string|null */ protected function getVerificationKey() { return $this->isAsymmetric() ? $this->getPublicKey() : $this->getSecret(); } /** * Determine if the algorithm is asymmetric, and thus requires a public/private key combo. * * @return bool */ abstract protected function isAsymmetric(); } JWT/Lcobucci.php 0000644 00000017561 15107366213 0007462 0 ustar 00 <?php /* * This file is part of jwt-auth. * * (c) Sean Tymon <tymon148@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Tymon\JWTAuth\Providers\JWT; use DateTimeImmutable; use DateTimeInterface; use Exception; use Illuminate\Support\Collection; use Lcobucci\JWT\Configuration; use Lcobucci\JWT\Signer; use Lcobucci\JWT\Signer\Ecdsa; use Lcobucci\JWT\Signer\Key; use Lcobucci\JWT\Signer\Key\InMemory; use Lcobucci\JWT\Signer\Rsa; use Lcobucci\JWT\Token\Builder; use Lcobucci\JWT\Token\RegisteredClaims; use Lcobucci\JWT\Validation\Constraint\SignedWith; use Tymon\JWTAuth\Contracts\Providers\JWT; use Tymon\JWTAuth\Exceptions\JWTException; use Tymon\JWTAuth\Exceptions\TokenInvalidException; class Lcobucci extends Provider implements JWT { /** * \Lcobucci\JWT\Signer. */ protected $signer; /** * \Lcobucci\JWT\Configuration. */ protected $config; /** * Create the Lcobucci provider. * * @param string $secret * @param string $algo * @param array $keys * @param \Lcobucci\JWT\Configuration|null $config * @return void */ public function __construct($secret, $algo, array $keys, $config = null) { parent::__construct($secret, $algo, $keys); $this->signer = $this->getSigner(); $this->config = $config ?: $this->buildConfig(); } /** * Signers that this provider supports. * * @var array */ protected $signers = [ self::ALGO_HS256 => Signer\Hmac\Sha256::class, self::ALGO_HS384 => Signer\Hmac\Sha384::class, self::ALGO_HS512 => Signer\Hmac\Sha512::class, self::ALGO_RS256 => Signer\Rsa\Sha256::class, self::ALGO_RS384 => Signer\Rsa\Sha384::class, self::ALGO_RS512 => Signer\Rsa\Sha512::class, self::ALGO_ES256 => Signer\Ecdsa\Sha256::class, self::ALGO_ES384 => Signer\Ecdsa\Sha384::class, self::ALGO_ES512 => Signer\Ecdsa\Sha512::class, ]; /** * Create a JSON Web Token. * * @param array $payload * @return string * * @throws \Tymon\JWTAuth\Exceptions\JWTException */ public function encode(array $payload) { $builder = $this->getBuilderFromClaims($payload); try { return $builder ->getToken($this->config->signer(), $this->config->signingKey()) ->toString(); } catch (Exception $e) { throw new JWTException('Could not create token: '.$e->getMessage(), $e->getCode(), $e); } } /** * Decode a JSON Web Token. * * @param string $token * @return array * * @throws \Tymon\JWTAuth\Exceptions\JWTException */ public function decode($token) { try { /** @var \Lcobucci\JWT\Token\Plain */ $token = $this->config->parser()->parse($token); } catch (Exception $e) { throw new TokenInvalidException('Could not decode token: '.$e->getMessage(), $e->getCode(), $e); } if (! $this->config->validator()->validate($token, ...$this->config->validationConstraints())) { throw new TokenInvalidException('Token Signature could not be verified.'); } return Collection::wrap($token->claims()->all()) ->map(function ($claim) { if ($claim instanceof DateTimeInterface) { return $claim->getTimestamp(); } return is_object($claim) && method_exists($claim, 'getValue') ? $claim->getValue() : $claim; }) ->toArray(); } /** * Create an instance of the builder with all of the claims applied. * * @param array $payload * @return \Lcobucci\JWT\Token\Builder */ protected function getBuilderFromClaims(array $payload): Builder { $builder = $this->config->builder(); foreach ($payload as $key => $value) { switch ($key) { case RegisteredClaims::ID: $builder->identifiedBy($value); break; case RegisteredClaims::EXPIRATION_TIME: $builder->expiresAt(DateTimeImmutable::createFromFormat('U', $value)); break; case RegisteredClaims::NOT_BEFORE: $builder->canOnlyBeUsedAfter(DateTimeImmutable::createFromFormat('U', $value)); break; case RegisteredClaims::ISSUED_AT: $builder->issuedAt(DateTimeImmutable::createFromFormat('U', $value)); break; case RegisteredClaims::ISSUER: $builder->issuedBy($value); break; case RegisteredClaims::AUDIENCE: $builder->permittedFor($value); break; case RegisteredClaims::SUBJECT: $builder->relatedTo($value); break; default: $builder->withClaim($key, $value); } } return $builder; } /** * Build the configuration. * * @return \Lcobucci\JWT\Configuration */ protected function buildConfig(): Configuration { $config = $this->isAsymmetric() ? Configuration::forAsymmetricSigner( $this->signer, $this->getSigningKey(), $this->getVerificationKey() ) : Configuration::forSymmetricSigner($this->signer, $this->getSigningKey()); $config->setValidationConstraints( new SignedWith($this->signer, $this->getVerificationKey()) ); return $config; } /** * Get the signer instance. * * @return \Lcobucci\JWT\Signer * * @throws \Tymon\JWTAuth\Exceptions\JWTException */ protected function getSigner() { if (! array_key_exists($this->algo, $this->signers)) { throw new JWTException('The given algorithm could not be found'); } $signer = $this->signers[$this->algo]; if (is_subclass_of($signer, Ecdsa::class)) { return $signer::create(); } return new $signer(); } /** * {@inheritdoc} */ protected function isAsymmetric() { return is_subclass_of($this->signer, Rsa::class) || is_subclass_of($this->signer, Ecdsa::class); } /** * {@inheritdoc} * * @return \Lcobucci\JWT\Signer\Key * * @throws \Tymon\JWTAuth\Exceptions\JWTException */ protected function getSigningKey() { if ($this->isAsymmetric()) { if (! $privateKey = $this->getPrivateKey()) { throw new JWTException('Private key is not set.'); } return $this->getKey($privateKey, $this->getPassphrase() ?? ''); } if (! $secret = $this->getSecret()) { throw new JWTException('Secret is not set.'); } return $this->getKey($secret); } /** * {@inheritdoc} * * @return \Lcobucci\JWT\Signer\Key * * @throws \Tymon\JWTAuth\Exceptions\JWTException */ protected function getVerificationKey() { if ($this->isAsymmetric()) { if (! $public = $this->getPublicKey()) { throw new JWTException('Public key is not set.'); } return $this->getKey($public); } if (! $secret = $this->getSecret()) { throw new JWTException('Secret is not set.'); } return $this->getKey($secret); } /** * Get the signing key instance. */ protected function getKey(string $contents, string $passphrase = ''): Key { return InMemory::plainText($contents, $passphrase); } } Auth/Illuminate.php 0000644 00000002453 15107366213 0010271 0 ustar 00 <?php /* * This file is part of jwt-auth. * * (c) Sean Tymon <tymon148@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Tymon\JWTAuth\Providers\Auth; use Illuminate\Contracts\Auth\Guard as GuardContract; use Tymon\JWTAuth\Contracts\Providers\Auth; class Illuminate implements Auth { /** * The authentication guard. * * @var \Illuminate\Contracts\Auth\Guard */ protected $auth; /** * Constructor. * * @param \Illuminate\Contracts\Auth\Guard $auth * @return void */ public function __construct(GuardContract $auth) { $this->auth = $auth; } /** * Check a user's credentials. * * @param array $credentials * @return bool */ public function byCredentials(array $credentials) { return $this->auth->once($credentials); } /** * Authenticate a user via the id. * * @param mixed $id * @return bool */ public function byId($id) { return $this->auth->onceUsingId($id); } /** * Get the currently authenticated user. * * @return mixed */ public function user() { return $this->auth->user(); } } Storage/Illuminate.php 0000644 00000010267 15107366213 0010776 0 ustar 00 <?php /* * This file is part of jwt-auth. * * (c) Sean Tymon <tymon148@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Tymon\JWTAuth\Providers\Storage; use BadMethodCallException; use Illuminate\Contracts\Cache\Repository as CacheContract; use Psr\SimpleCache\CacheInterface as PsrCacheInterface; use Tymon\JWTAuth\Contracts\Providers\Storage; class Illuminate implements Storage { /** * The cache repository contract. * * @var \Illuminate\Contracts\Cache\Repository */ protected $cache; /** * The used cache tag. * * @var string */ protected $tag = 'tymon.jwt'; /** * @var bool */ protected $supportsTags; /** * @var string|null */ protected $laravelVersion; /** * Constructor. * * @param \Illuminate\Contracts\Cache\Repository $cache * @return void */ public function __construct(CacheContract $cache) { $this->cache = $cache; } /** * Add a new item into storage. * * @param string $key * @param mixed $value * @param int $minutes * @return void */ public function add($key, $value, $minutes) { // If the laravel version is 5.8 or higher then convert minutes to seconds. if ($this->laravelVersion !== null && is_int($minutes) && version_compare($this->laravelVersion, '5.8', '>=') ) { $minutes = $minutes * 60; } $this->cache()->put($key, $value, $minutes); } /** * Add a new item into storage forever. * * @param string $key * @param mixed $value * @return void */ public function forever($key, $value) { $this->cache()->forever($key, $value); } /** * Get an item from storage. * * @param string $key * @return mixed */ public function get($key) { return $this->cache()->get($key); } /** * Remove an item from storage. * * @param string $key * @return bool */ public function destroy($key) { return $this->cache()->forget($key); } /** * Remove all items associated with the tag. * * @return void */ public function flush() { $this->cache()->flush(); } /** * Return the cache instance with tags attached. * * @return \Illuminate\Contracts\Cache\Repository */ protected function cache() { if ($this->supportsTags === null) { $this->determineTagSupport(); } if ($this->supportsTags) { return $this->cache->tags($this->tag); } return $this->cache; } /** * Set the laravel version. */ public function setLaravelVersion($version) { $this->laravelVersion = $version; return $this; } /** * Detect as best we can whether tags are supported with this repository & store, * and save our result on the $supportsTags flag. * * @return void */ protected function determineTagSupport() { // Laravel >= 5.1.28 if (method_exists($this->cache, 'tags') || $this->cache instanceof PsrCacheInterface) { try { // Attempt the repository tags command, which throws exceptions when unsupported $this->cache->tags($this->tag); $this->supportsTags = true; } catch (BadMethodCallException $ex) { $this->supportsTags = false; } } else { // Laravel <= 5.1.27 if (method_exists($this->cache, 'getStore')) { // Check for the tags function directly on the store $this->supportsTags = method_exists($this->cache->getStore(), 'tags'); } else { // Must be using custom cache repository without getStore(), and all bets are off, // or we are mocking the cache contract (in testing), which will not create a getStore method $this->supportsTags = false; } } } } LaravelServiceProvider.php 0000644 00000003263 15107366213 0011707 0 ustar 00 <?php /* * This file is part of jwt-auth. * * (c) Sean Tymon <tymon148@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Tymon\JWTAuth\Providers; use Tymon\JWTAuth\Http\Parser\Cookies; use Tymon\JWTAuth\Http\Parser\RouteParams; class LaravelServiceProvider extends AbstractServiceProvider { /** * {@inheritdoc} */ public function boot() { $path = realpath(__DIR__.'/../../config/config.php'); $this->publishes([$path => config_path('jwt.php')], 'config'); $this->mergeConfigFrom($path, 'jwt'); $this->aliasMiddleware(); $this->extendAuthGuard(); $this->app['tymon.jwt.parser']->addParser([ new RouteParams, new Cookies($this->config('decrypt_cookies')), ]); } /** * {@inheritdoc} */ protected function registerStorageProvider() { $this->app->singleton('tymon.jwt.provider.storage', function () { $instance = $this->getConfigInstance('providers.storage'); if (method_exists($instance, 'setLaravelVersion')) { $instance->setLaravelVersion($this->app->version()); } return $instance; }); } /** * Alias the middleware. * * @return void */ protected function aliasMiddleware() { $router = $this->app['router']; $method = method_exists($router, 'aliasMiddleware') ? 'aliasMiddleware' : 'middleware'; foreach ($this->middlewareAliases as $alias => $middleware) { $router->$method($alias, $middleware); } } }
Simpan