feat(auth): add change password API and frontend page
Backend: - Add ChangePasswordReq DTO with validation (current + new password) - Add AuthService::change_password() method with credential verification, password rehash, and token revocation - Add POST /api/v1/auth/change-password endpoint with utoipa annotation Frontend: - Add changePassword() API function in auth.ts - Add ChangePassword.tsx page with form validation and confirmation - Add "修改密码" tab in Settings page After password change, all refresh tokens are revoked and the user is redirected to the login page.
This commit is contained in:
@@ -21,6 +21,7 @@ struct ApiDoc;
|
||||
erp_auth::handler::auth_handler::login,
|
||||
erp_auth::handler::auth_handler::refresh,
|
||||
erp_auth::handler::auth_handler::logout,
|
||||
erp_auth::handler::auth_handler::change_password,
|
||||
erp_auth::handler::user_handler::list_users,
|
||||
erp_auth::handler::user_handler::create_user,
|
||||
erp_auth::handler::user_handler::get_user,
|
||||
@@ -49,6 +50,7 @@ struct ApiDoc;
|
||||
erp_auth::dto::UpdateRoleReq,
|
||||
erp_auth::dto::PermissionResp,
|
||||
erp_auth::dto::AssignPermissionsReq,
|
||||
erp_auth::dto::ChangePasswordReq,
|
||||
)
|
||||
)
|
||||
)]
|
||||
|
||||
Reference in New Issue
Block a user