Revert OAuth2.0

This commit is contained in:
2026-06-16 21:35:10 +02:00
parent 69f4d6a602
commit 6001c2e3b8
33 changed files with 56 additions and 1127 deletions
-46
View File
@@ -1,46 +0,0 @@
<?php
declare(strict_types=1);
namespace App\Models;
use App\Enums\GoogleService;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\Crypt;
class GoogleOAuthConnection extends Model
{
protected $fillable = [
'service',
'client_id',
'client_secret',
'refresh_token',
];
protected function casts(): array
{
return [
'service' => GoogleService::class,
];
}
public function getClientSecretAttribute(?string $value): ?string
{
return $value ? Crypt::decryptString($value) : null;
}
public function setClientSecretAttribute(?string $value): void
{
$this->attributes['client_secret'] = $value ? Crypt::encryptString($value) : null;
}
public function getRefreshTokenAttribute(?string $value): ?string
{
return $value ? Crypt::decryptString($value) : null;
}
public function setRefreshTokenAttribute(?string $value): void
{
$this->attributes['refresh_token'] = $value ? Crypt::encryptString($value) : null;
}
}