Add OAuth functionality, MCP tools, and feature tests

- 🔒 Added migrations for `oauth_access_tokens`, `oauth_refresh_tokens`, `oauth_auth_codes`, `oauth_clients`, and `oauth_device_codes`.
- 🤖 Created MCP tools (Meetups, Cities, Venues, Courses, Lecturers) for managing entities with authentication and validation.
- 🛠️ Implemented Passport-backed OAuth API guard configuration and validation endpoints.
-  Added comprehensive feature tests for MCP tools and OAuth functionality (access control, validation, and token-based authentication).
This commit is contained in:
HolgerHatGarKeineNode
2026-06-08 09:37:00 +02:00
parent 3cad5f5636
commit d0544bfac9
67 changed files with 3948 additions and 83 deletions
+10
View File
@@ -17,6 +17,7 @@ use Illuminate\Support\Facades\URL;
use Illuminate\Support\ServiceProvider;
use Laravel\Nightwatch\Facades\Nightwatch;
use Laravel\Nightwatch\Http\Middleware\Sample;
use Laravel\Passport\Passport;
use Livewire\Livewire;
class AppServiceProvider extends ServiceProvider
@@ -40,6 +41,15 @@ class AppServiceProvider extends ServiceProvider
Gate::define('viewApiDocs', fn (?Authenticatable $user = null): bool => true);
// OAuth-2.1-Flow des MCP-Servers (Claude.ai Web-Connector).
Passport::authorizationView(fn ($parameters) => view('mcp.authorize', $parameters));
// Kurze Access-Token-Lebensdauer mit Refresh-Rotation begrenzt den Schaden eines
// geleakten Tokens (öffentliche PKCE-Clients ohne Client-Secret). Passport-Default
// wäre sonst 1 Jahr für Access- UND Refresh-Token.
Passport::tokensExpireIn(now()->addHours(8));
Passport::refreshTokensExpireIn(now()->addDays(14));
if ($this->app->environment('production')) {
URL::forceScheme('https');
}