. */ declare(strict_types=1); namespace App\Security; use App\Entity\UserSystem\ApiToken; use Symfony\Component\Security\Http\Authenticator\Passport\Badge\BadgeInterface; class ApiTokenBadge implements BadgeInterface { /** * @param ApiToken $apiToken */ public function __construct(private readonly ApiToken $apiToken) { } /** * @return ApiToken The token that was used to authenticate the user */ public function getApiToken(): ApiToken { return $this->apiToken; } public function isResolved(): bool { return true; } }