Skip to content

Preliminar hashingStage2#321

Merged
inetol merged 3 commits intodevfrom
dense-crown
Apr 26, 2026
Merged

Preliminar hashingStage2#321
inetol merged 3 commits intodevfrom
dense-crown

Conversation

@inetol
Copy link
Copy Markdown
Member

@inetol inetol commented Apr 26, 2026

Se ha extendido la funcionalidad de user/v1 , ahora se puede eliminar el usuario y rotar el token.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Este PR amplía user/v1 agregando endpoints para eliminar un usuario y rotar su token, y mueve la detección de tokens sin hash a un chequeo en el arranque para avisar sobre usuarios antiguos que podrían perder acceso.

Changes:

  • Nuevo DELETE /user/v1/ para eliminar el usuario autenticado.
  • Nuevo POST /user/v1/token para rotar el token (persistiendo el hash en DB y devolviendo el token plano nuevo).
  • Chequeo en startup que avisa si existen usuarios con tokens no hasheados; pequeños ajustes de naming/descripciones en endpoints de document.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/init.ts Agrega initUnhashedTokenCheck() y logging de advertencia si hay tokens no hasheados.
src/index.ts Ejecuta el nuevo chequeo de tokens no hasheados durante el arranque.
src/endpoints/user/v1/rotateToken.ts Implementa endpoint para rotación de token de usuario autenticado.
src/endpoints/user/v1/drop.ts Implementa endpoint para eliminar el usuario autenticado.
src/endpoints/user/v1/index.ts Registra los nuevos handlers drop y rotateToken en user/v1.
src/endpoints/document/v1/index.ts Ajusta el registro del endpoint delete (ahora drop).
src/endpoints/document/v1/drop.ts Ajusta summary/description del endpoint de borrado de documento.
src/endpoints/document/v1/get.ts Ajusta wording de la descripción del endpoint.
src/endpoints/document/v1/patch.ts Ajusta wording de la descripción del endpoint.
src/database/migration.ts Elimina el warning de tokens “plain/unhashed” del proceso de migración.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/init.ts
Comment thread src/endpoints/user/v1/drop.ts
@inetol inetol added this pull request to the merge queue Apr 26, 2026
Merged via the queue into dev with commit 1d3369f Apr 26, 2026
5 checks passed
@inetol inetol deleted the dense-crown branch April 26, 2026 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants