mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-28 06:57:22 +08:00
fix oauth client secret
This commit is contained in:
@@ -6,7 +6,7 @@ use App\Filament\OptionsTrait;
|
|||||||
use App\Filament\PageListSingle;
|
use App\Filament\PageListSingle;
|
||||||
use App\Filament\Resources\Oauth\ClientResource\Pages;
|
use App\Filament\Resources\Oauth\ClientResource\Pages;
|
||||||
use App\Filament\Resources\Oauth\ClientResource\RelationManagers;
|
use App\Filament\Resources\Oauth\ClientResource\RelationManagers;
|
||||||
use Laravel\Passport\Client;
|
use App\Models\OauthClient;
|
||||||
use Filament\Forms;
|
use Filament\Forms;
|
||||||
use Filament\Resources\Form;
|
use Filament\Resources\Form;
|
||||||
use Filament\Resources\Resource;
|
use Filament\Resources\Resource;
|
||||||
@@ -19,7 +19,7 @@ class ClientResource extends Resource
|
|||||||
{
|
{
|
||||||
use OptionsTrait;
|
use OptionsTrait;
|
||||||
|
|
||||||
protected static ?string $model = Client::class;
|
protected static ?string $model = OauthClient::class;
|
||||||
|
|
||||||
protected static ?string $navigationIcon = 'heroicon-o-collection';
|
protected static ?string $navigationIcon = 'heroicon-o-collection';
|
||||||
|
|
||||||
|
|||||||
@@ -2,10 +2,17 @@
|
|||||||
|
|
||||||
namespace App\Models;
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Support\Str;
|
||||||
use Laravel\Passport\Client;
|
use Laravel\Passport\Client;
|
||||||
|
|
||||||
class OauthClient extends Client
|
class OauthClient extends Client
|
||||||
{
|
{
|
||||||
|
protected static function booted(): void
|
||||||
|
{
|
||||||
|
static::creating(function (OauthClient $model) {
|
||||||
|
$model->secret = Str::random(40);
|
||||||
|
});
|
||||||
|
}
|
||||||
public function skipsAuthorization(): bool
|
public function skipsAuthorization(): bool
|
||||||
{
|
{
|
||||||
return (bool)$this->skips_authorization;
|
return (bool)$this->skips_authorization;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
defined('VERSION_NUMBER') || define('VERSION_NUMBER', '1.8.9');
|
defined('VERSION_NUMBER') || define('VERSION_NUMBER', '1.8.9');
|
||||||
defined('RELEASE_DATE') || define('RELEASE_DATE', '2024-03-17');
|
defined('RELEASE_DATE') || define('RELEASE_DATE', '2024-03-18');
|
||||||
defined('IN_TRACKER') || define('IN_TRACKER', false);
|
defined('IN_TRACKER') || define('IN_TRACKER', false);
|
||||||
defined('PROJECTNAME') || define("PROJECTNAME","NexusPHP");
|
defined('PROJECTNAME') || define("PROJECTNAME","NexusPHP");
|
||||||
defined('NEXUSPHPURL') || define("NEXUSPHPURL","https://nexusphp.org");
|
defined('NEXUSPHPURL') || define("NEXUSPHPURL","https://nexusphp.org");
|
||||||
|
|||||||
Reference in New Issue
Block a user