Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
use Functional\Users\Http\Controllers\AuthController;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
// Le préfixe api/ est ajouté par UsersServiceProvider::withRouting() : GET /api/me.
|
||||
Route::get('me', [AuthController::class, 'me'])->middleware('auth:sanctum');
|
||||
@@ -0,0 +1,6 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Broadcast;
|
||||
|
||||
// Define broadcast channels here, e.g.:
|
||||
// Broadcast::channel('App.Models.User.{id}', fn($user, $id) => (int) $user->id === (int) $id);
|
||||
@@ -0,0 +1,6 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Artisan;
|
||||
|
||||
// Define artisan commands here, e.g.:
|
||||
// Artisan::command('layer:hello', fn() => info('Hello from this layer.'));
|
||||
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
use Functional\Users\Http\Controllers\AuthController;
|
||||
use Functional\Users\Http\Controllers\OidcController;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
// Auth 100% back par cookie de session Sanctum SPA : inscription, login/logout par mot de passe,
|
||||
// et login OIDC piloté par le back (pocket-id). Le front ne fait que suivre ces routes.
|
||||
Route::post('register', [AuthController::class, 'register']);
|
||||
Route::post('login', [AuthController::class, 'login']);
|
||||
Route::post('logout', [AuthController::class, 'logout'])->middleware('auth');
|
||||
|
||||
Route::prefix('auth/oidc')->name('oidc.')->group(function (): void {
|
||||
Route::get('redirect', [OidcController::class, 'redirect'])->name('redirect');
|
||||
Route::get('callback', [OidcController::class, 'callback'])->name('callback');
|
||||
});
|
||||
Reference in New Issue
Block a user