implement auth controller and routes
Wires AuthController (signup, confirmEmail, login, me, logout) to the existing auth use cases. Routes mounted under /api with AuthMiddleware on logout/me. RepositoryServiceProvider gains EmailConfirmationToken and Post bindings; AppServiceProvider binds the Emailer/EmailFactory and constructs SignupUser with the configured from-address.
This commit is contained in:
parent
0ffc4b546c
commit
9049f1581b
4 changed files with 219 additions and 4 deletions
|
|
@ -1,6 +1,17 @@
|
|||
<?php
|
||||
|
||||
// Route registrations land here as the auth, user, post, and comment
|
||||
// domains come online. Empty for now - the skeleton commit only wires
|
||||
// up the file so bootstrap/app.php's withRouting(api: ...) has a valid
|
||||
// target.
|
||||
use App\Controllers\AuthController;
|
||||
use App\Http\Middleware\AuthMiddleware;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
Route::get('/', function () {
|
||||
return '';
|
||||
});
|
||||
|
||||
Route::post('/signup', [AuthController::class, 'signup']);
|
||||
Route::post('/confirm-email', [AuthController::class, 'confirmEmail']);
|
||||
Route::post('/login', [AuthController::class, 'login']);
|
||||
Route::post('/logout', [AuthController::class, 'logout'])
|
||||
->middleware(AuthMiddleware::class);
|
||||
Route::get('/me', [AuthController::class, 'me'])
|
||||
->middleware(AuthMiddleware::class);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue