diff --git a/.env b/.env index 193bec9..b1d0ee8 100644 --- a/.env +++ b/.env @@ -20,4 +20,4 @@ JWT_COOKIE_TTL=86400 DATABASE_URL="postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:${POSTGRES_PORT}/${POSTGRES_DB}?serverVersion=16&charset=utf8" -GITEA_ENCRYPTION_KEY= \ No newline at end of file +ENCRYPTION_KEY=aaaaaaaaa \ No newline at end of file diff --git a/src/Service/TokenEncryptor.php b/src/Service/TokenEncryptor.php index 86be2ae..3038820 100644 --- a/src/Service/TokenEncryptor.php +++ b/src/Service/TokenEncryptor.php @@ -4,7 +4,6 @@ declare(strict_types=1); namespace App\Service; -use App\Exception\GiteaApiException; use RuntimeException; use SodiumException; use Symfony\Component\DependencyInjection\Attribute\Autowire; @@ -15,7 +14,7 @@ final class TokenEncryptor private readonly bool $configured; public function __construct( - #[Autowire('%env(GITEA_ENCRYPTION_KEY)%')] + #[Autowire('%env(ENCRYPTION_KEY)%')] string $encryptionKey, ) { if ('' === $encryptionKey) { @@ -75,7 +74,7 @@ final class TokenEncryptor private function assertConfigured(): void { if (!$this->configured) { - throw new GiteaApiException('Gitea encryption is not configured. Please set a valid GITEA_ENCRYPTION_KEY.'); + throw new RuntimeException('Encryption is not configured. Please set a valid ENCRYPTION_KEY.'); } } }