diff --git a/src/Models/AccessToken.php b/src/Models/AccessToken.php index 502d559..4204e88 100644 --- a/src/Models/AccessToken.php +++ b/src/Models/AccessToken.php @@ -15,4 +15,5 @@ use Flarum\Database\AbstractModel; class AccessToken extends AbstractModel { protected $table = 'oauth_access_tokens'; + protected $guarded = []; } diff --git a/src/Models/AuthorizationCode.php b/src/Models/AuthorizationCode.php index 8b34f73..f144175 100644 --- a/src/Models/AuthorizationCode.php +++ b/src/Models/AuthorizationCode.php @@ -15,4 +15,5 @@ use Flarum\Database\AbstractModel; class AuthorizationCode extends AbstractModel { protected $table = 'oauth_authorization_codes'; + protected $guarded = []; } diff --git a/src/Models/Client.php b/src/Models/Client.php index c9e2c98..d6dc3d2 100644 --- a/src/Models/Client.php +++ b/src/Models/Client.php @@ -15,7 +15,6 @@ use Flarum\Database\AbstractModel; class Client extends AbstractModel { protected $table = 'oauth_clients'; - protected $guarded = []; public static function build(string $client_id, string $client_secret, int $user_id) diff --git a/src/Models/Jwt.php b/src/Models/Jwt.php index d9ee703..652a3c4 100644 --- a/src/Models/Jwt.php +++ b/src/Models/Jwt.php @@ -15,4 +15,5 @@ use Flarum\Database\AbstractModel; class Jwt extends AbstractModel { protected $table = 'oauth_jwt'; + protected $guarded = []; } diff --git a/src/Models/RefreshToken.php b/src/Models/RefreshToken.php index 7f6bea0..92919f4 100644 --- a/src/Models/RefreshToken.php +++ b/src/Models/RefreshToken.php @@ -15,4 +15,5 @@ use Flarum\Database\AbstractModel; class RefreshToken extends AbstractModel { protected $table = 'oauth_refresh_tokens'; + protected $guarded = []; } diff --git a/src/Models/Scope.php b/src/Models/Scope.php index 125bf94..b191afc 100644 --- a/src/Models/Scope.php +++ b/src/Models/Scope.php @@ -15,7 +15,7 @@ use Flarum\Database\AbstractModel; class Scope extends AbstractModel { protected $table = 'oauth_scopes'; - + protected $guarded = []; static public function get_path_scope($path = '') { return self::where('resource_path', 'like', $path . '%')->first();