Auth endpoint
The IndieAuth endpoint should be added, currently adding the unt tests
This commit is contained in:
parent
7ad5d56f1b
commit
5b2bfd5270
18 changed files with 1282 additions and 475 deletions
|
@ -16,6 +16,7 @@ use App\Http\Controllers\BookmarksController;
|
|||
use App\Http\Controllers\ContactsController;
|
||||
use App\Http\Controllers\FeedsController;
|
||||
use App\Http\Controllers\FrontPageController;
|
||||
use App\Http\Controllers\IndieAuthController;
|
||||
use App\Http\Controllers\LikesController;
|
||||
use App\Http\Controllers\MicropubController;
|
||||
use App\Http\Controllers\MicropubMediaController;
|
||||
|
@ -190,6 +191,23 @@ Route::domain(config('url.longurl'))->group(function () {
|
|||
Route::get('/tagged/{tag}', [BookmarksController::class, 'tagged']);
|
||||
});
|
||||
|
||||
// IndieAuth
|
||||
Route::get('auth', [IndieAuthController::class, 'start'])->middleware(MyAuthMiddleware::class);
|
||||
Route::post('auth/confirm', [IndieAuthController::class, 'confirm'])->middleware(MyAuthMiddleware::class);
|
||||
Route::post('auth', [IndieAuthController::class, 'processCodeExchange']);
|
||||
|
||||
Route::get('/test-auth-cache', function () {
|
||||
$cacheKey = hash('xxh3', 'http://jonnybarnes.localhost');
|
||||
|
||||
dump(Cache::get($cacheKey));
|
||||
});
|
||||
|
||||
Route::get('/test-me', function () {
|
||||
return response()->json([
|
||||
'me' => config('app.url'),
|
||||
]);
|
||||
});
|
||||
|
||||
// Token Endpoint
|
||||
Route::post('api/token', [TokenEndpointController::class, 'create']);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue