Javier Feliz 392d14e0e1
All checks were successful
linter / quality (push) Successful in 6m47s
tests / ci (push) Successful in 11m57s
WIP
2025-07-27 23:15:54 -04:00

46 lines
1.8 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('logout', [OIDCController::class, 'logout'])->name('auth.logout');
});
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';