Move integration credentials into encrypted dashboard settings
Deploy HickLab3D Dashboard / Deploy to production (push) Successful in 1m42s
Deploy HickLab3D Dashboard / Deploy to production (push) Successful in 1m42s
This commit is contained in:
@@ -11,7 +11,7 @@ class EtsyAppCredential extends Model
|
||||
/** @use HasFactory<EtsyAppCredentialFactory> */
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = ['keystring', 'shared_secret'];
|
||||
protected $fillable = ['keystring', 'shared_secret', 'shop_name', 'redirect_uri'];
|
||||
|
||||
protected $hidden = ['keystring', 'shared_secret'];
|
||||
|
||||
@@ -20,6 +20,8 @@ class EtsyAppCredential extends Model
|
||||
return [
|
||||
'keystring' => 'encrypted',
|
||||
'shared_secret' => 'encrypted',
|
||||
'shop_name' => 'encrypted',
|
||||
'redirect_uri' => 'encrypted',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Database\Factories\IntegrationSettingFactory;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class IntegrationSetting extends Model
|
||||
{
|
||||
/** @use HasFactory<IntegrationSettingFactory> */
|
||||
use HasFactory;
|
||||
|
||||
public $incrementing = false;
|
||||
|
||||
protected $primaryKey = 'provider';
|
||||
|
||||
protected $keyType = 'string';
|
||||
|
||||
protected $fillable = ['provider', 'settings'];
|
||||
|
||||
protected $hidden = ['settings'];
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return ['settings' => 'encrypted:array'];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user