X7ROOT File Manager
Current Path:
/home/gfecatvj/sites/realesbar/vendor/laravel/passport/src
home
/
gfecatvj
/
sites
/
realesbar
/
vendor
/
laravel
/
passport
/
src
/
📁
..
📄
ApiTokenCookieFactory.php
(2.07 KB)
📄
AuthCode.php
(1.49 KB)
📁
Bridge
📄
Client.php
(4.08 KB)
📄
ClientRepository.php
(5.52 KB)
📁
Console
📁
Events
📁
Exceptions
📁
Guards
📄
HasApiTokens.php
(1.88 KB)
📁
Http
📄
Passport.php
(15.63 KB)
📄
PassportServiceProvider.php
(8.96 KB)
📄
PassportUserProvider.php
(1.81 KB)
📄
PersonalAccessClient.php
(868 B)
📄
PersonalAccessTokenFactory.php
(3.62 KB)
📄
PersonalAccessTokenResult.php
(1.15 KB)
📄
RefreshToken.php
(1.85 KB)
📄
RefreshTokenRepository.php
(1.6 KB)
📄
RouteRegistrar.php
(4.63 KB)
📄
Scope.php
(1.08 KB)
📄
Token.php
(3.38 KB)
📄
TokenRepository.php
(2.93 KB)
📄
TransientToken.php
(610 B)
Editing: ApiTokenCookieFactory.php
<?php namespace Laravel\Passport; use Carbon\Carbon; use Firebase\JWT\JWT; use Illuminate\Contracts\Config\Repository as Config; use Illuminate\Contracts\Encryption\Encrypter; use Symfony\Component\HttpFoundation\Cookie; class ApiTokenCookieFactory { /** * The configuration repository implementation. * * @var \Illuminate\Contracts\Config\Repository */ protected $config; /** * The encrypter implementation. * * @var \Illuminate\Contracts\Encryption\Encrypter */ protected $encrypter; /** * Create an API token cookie factory instance. * * @param \Illuminate\Contracts\Config\Repository $config * @param \Illuminate\Contracts\Encryption\Encrypter $encrypter * @return void */ public function __construct(Config $config, Encrypter $encrypter) { $this->config = $config; $this->encrypter = $encrypter; } /** * Create a new API token cookie. * * @param mixed $userId * @param string $csrfToken * @return \Symfony\Component\HttpFoundation\Cookie */ public function make($userId, $csrfToken) { $config = $this->config->get('session'); $expiration = Carbon::now()->addMinutes($config['lifetime']); return new Cookie( Passport::cookie(), $this->createToken($userId, $csrfToken, $expiration), $expiration, $config['path'], $config['domain'], $config['secure'], true, false, $config['same_site'] ?? null ); } /** * Create a new JWT token for the given user ID and CSRF token. * * @param mixed $userId * @param string $csrfToken * @param \Carbon\Carbon $expiration * @return string */ protected function createToken($userId, $csrfToken, Carbon $expiration) { return JWT::encode([ 'sub' => $userId, 'csrf' => $csrfToken, 'expiry' => $expiration->getTimestamp(), ], $this->encrypter->getKey()); } }
Upload File
Create Folder