- User 모델에 must_change_password 필드 추가 - UserService: createUser(), resetPassword()에서 플래그 설정 - ProfileService: changePassword()에서 플래그 해제 - EnsurePasswordChanged 미들웨어 추가 - 인증 라우트에 password.changed 미들웨어 적용 - 프로필 페이지에 비밀번호 변경 필요 알림 추가 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
31 lines
1.1 KiB
PHP
31 lines
1.1 KiB
PHP
<?php
|
|
|
|
use Illuminate\Foundation\Application;
|
|
use Illuminate\Foundation\Configuration\Exceptions;
|
|
use Illuminate\Foundation\Configuration\Middleware;
|
|
|
|
return Application::configure(basePath: dirname(__DIR__))
|
|
->withRouting(
|
|
web: __DIR__.'/../routes/web.php',
|
|
api: __DIR__.'/../routes/api.php',
|
|
apiPrefix: 'api',
|
|
commands: __DIR__.'/../routes/console.php',
|
|
health: '/up',
|
|
)
|
|
->withMiddleware(function (Middleware $middleware): void {
|
|
// 미들웨어 별칭 등록
|
|
$middleware->alias([
|
|
'hq.member' => \App\Http\Middleware\EnsureHQMember::class,
|
|
'super.admin' => \App\Http\Middleware\EnsureSuperAdmin::class,
|
|
'password.changed' => \App\Http\Middleware\EnsurePasswordChanged::class,
|
|
]);
|
|
|
|
// auth 미들웨어 그룹에 HQ 검증 추가
|
|
$middleware->appendToGroup('web', [
|
|
// 기본 web 미들웨어에는 추가하지 않음 (auth에서만 적용)
|
|
]);
|
|
})
|
|
->withExceptions(function (Exceptions $exceptions): void {
|
|
//
|
|
})->create();
|