Javier Feliz 38c0c70ded
Some checks failed
linter / quality (push) Successful in 3m2s
tests / ci (push) Failing after 7m37s
Bunch of progress
2025-07-27 22:18:35 -04:00

45 lines
1.7 KiB
PHP

<?php
use App\Http\Controllers\OIDCController;
use App\Livewire\ConsentScreen;
use App\Livewire\Settings\Appearance;
use App\Livewire\Settings\Password;
use App\Livewire\Settings\Profile;
use App\Models\User;
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken;
use Illuminate\Support\Facades\Route;
use Illuminate\Support\Facades\Storage;
Route::get('/', function () {
return view('welcome');
})->name('home');
Route::view('dashboard', 'dashboard')
->middleware(['auth', 'verified'])
->name('dashboard');
Route::middleware(['auth'])->group(function () {
Route::redirect('settings', 'settings/profile');
Route::get('settings/profile', Profile::class)->name('settings.profile');
Route::get('settings/password', Password::class)->name('settings.password');
Route::get('settings/appearance', Appearance::class)->name('settings.appearance');
});
Route::get('avatars/{path}', function (string $path) {
$path = Storage::disk('avatars')->path($path);
return response()->file($path);
})->name('user.avatar');
// OIDC Endpoints
Route::prefix('application/o')->group(function () {
Route::get('authorize', [OIDCController::class, 'authorize'])->middleware('auth')->name('auth.authorize');
Route::post('token', [OIDCController::class, 'token'])->withoutMiddleware(VerifyCsrfToken::class)->name('auth.token');
Route::get('userinfo', [OIDCController::class, 'userinfo'])->name('auth.userinfo');
Route::get('confirm', ConsentScreen::class)->name('auth.confirm');
});
Route::get('.well-known/jwks.json', [OIDCController::class, 'jwks'])->name('auth.keys');
Route::get('.well-known/openid-configuration', [OIDCController::class, 'openidConfig'])->name('auth.openid-configuration');
require __DIR__ . '/auth.php';