-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathroutes.php
24 lines (18 loc) · 846 Bytes
/
routes.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php
use Illuminate\Support\Facades\Route;
use janboddez\IndieAuth\Http\Controllers\IndieAuthController;
Route::prefix('indieauth')
->group(function () {
Route::middleware('web')
->get('/metadata', [IndieAuthController::class, 'metadata']);
Route::middleware(['web', 'auth'])
->get('/', [IndieAuthController::class, 'start']);
Route::middleware('web')
->post('/', [IndieAuthController::class, 'approve']);
Route::middleware('api')
->post('/token', [IndieAuthController::class, 'issueToken']);
Route::middleware(['api', 'auth:sanctum'])->group(function () {
Route::get('/token', [IndieAuthController::class, 'verifyToken']);
Route::post('/token/revocation', [IndieAuthController::class, 'revokeToken']);
});
});