![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/job-board.corals.io/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(); } }