Part-DB-server/src/Security/OAuth/Entity/TransientRefreshToken.php
2026-07-26 19:51:10 +02:00

40 lines
1.7 KiB
PHP

<?php
/*
* This file is part of Part-DB (https://github.com/Part-DB/Part-DB-symfony).
*
* Copyright (C) 2019 - 2023 Jan Böhmer (https://github.com/jbtronics)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
declare(strict_types=1);
namespace App\Security\OAuth\Entity;
use League\OAuth2\Server\Entities\RefreshTokenEntityInterface;
use League\OAuth2\Server\Entities\Traits\EntityTrait;
use League\OAuth2\Server\Entities\Traits\RefreshTokenTrait;
/**
* A purely in-memory RefreshTokenEntityInterface used only while league/oauth2-server is issuing a
* refresh token. league/oauth2-server itself never stores the refresh token's content server-side -
* it hands the client an encrypted, self-contained payload and decrypts/validates it directly on the
* next request. Our RefreshTokenRepository only needs to persist a small revocation record
* (App\Entity\UserSystem\OAuth\OAuthRefreshToken) keyed by identifier; see that repository.
*/
class TransientRefreshToken implements RefreshTokenEntityInterface
{
use EntityTrait;
use RefreshTokenTrait;
}