diff --git a/src/app/Http/Controllers/ChangePasswordController.php b/src/app/Http/Controllers/ChangePasswordController.php new file mode 100644 index 0000000..bbc2a7f --- /dev/null +++ b/src/app/Http/Controllers/ChangePasswordController.php @@ -0,0 +1,28 @@ +username(), $request->password()); + $adminSetUserPassword->execute($payload); + + Auth::login($user); + Session::regenerate(); + Session::regenerateToken(); + + return redirect()->route('dashboard'); + } +} diff --git a/src/app/Http/Requests/ChangePasswordRequest.php b/src/app/Http/Requests/ChangePasswordRequest.php new file mode 100644 index 0000000..08f04ef --- /dev/null +++ b/src/app/Http/Requests/ChangePasswordRequest.php @@ -0,0 +1,28 @@ + ['required', 'string'], + 'password' => ['required', 'string'], + ]; + } + + public function username(): string + { + return $this->input('username'); + } + + public function password(): string + { + return $this->input('password'); + } +} diff --git a/src/resources/views/force-password-change.blade.php b/src/resources/views/force-password-change.blade.php new file mode 100644 index 0000000..06baae3 --- /dev/null +++ b/src/resources/views/force-password-change.blade.php @@ -0,0 +1,14 @@ +@extends('layouts.app') + +@section('title', 'パスワード変更') + +@section('content') +