![]() Server : Apache/2.4.62 (Unix) OpenSSL/1.0.2k-fips System : Linux server1.richineiserver.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64 User : fdshops ( 1003) PHP Version : 8.2.21 Disable Function : NONE Directory : /home/fdshops/public_html/vendor/laravel/passport/src/Bridge/ |
<?php namespace Laravel\Passport\Bridge; use Laravel\Passport\Passport; use League\OAuth2\Server\Entities\AuthCodeEntityInterface; use League\OAuth2\Server\Repositories\AuthCodeRepositoryInterface; class AuthCodeRepository implements AuthCodeRepositoryInterface { use FormatsScopesForStorage; /** * {@inheritdoc} */ public function getNewAuthCode() { return new AuthCode; } /** * {@inheritdoc} */ public function persistNewAuthCode(AuthCodeEntityInterface $authCodeEntity) { $attributes = [ 'id' => $authCodeEntity->getIdentifier(), 'user_id' => $authCodeEntity->getUserIdentifier(), 'client_id' => $authCodeEntity->getClient()->getIdentifier(), 'scopes' => $this->formatScopesForStorage($authCodeEntity->getScopes()), 'revoked' => false, 'expires_at' => $authCodeEntity->getExpiryDateTime(), ]; Passport::authCode()->forceFill($attributes)->save(); } /** * {@inheritdoc} */ public function revokeAuthCode($codeId) { Passport::authCode()->where('id', $codeId)->update(['revoked' => true]); } /** * {@inheritdoc} */ public function isAuthCodeRevoked($codeId) { return Passport::authCode()->where('id', $codeId)->where('revoked', 1)->exists(); } }