Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Auth] - Criar módulo de autenticação JWT e middleware de verificação #26

Closed
Alecell opened this issue Apr 29, 2024 · 1 comment · Fixed by #94
Closed

[Auth] - Criar módulo de autenticação JWT e middleware de verificação #26

Alecell opened this issue Apr 29, 2024 · 1 comment · Fixed by #94
Assignees

Comments

@Alecell
Copy link

Alecell commented Apr 29, 2024

Precisamos de uma classe responsável pela criação, verificação e parseamento de tokens JWT.
Esse módulo de JWT ficará dentro de shared/infra e deverá conter testes unitários mockando o JWT.

Nessa classe deverá conter os métodos de:

  • create(): responsável por criar um token JWT válido para aplicação
  • refreshToken(): irá criar um novo token JWT válido
  • parseToken(): irá retorna o payload do token

O Middleware deve ser responsável por utilizar essa classe JWT para verificar se o usuário está ou não autenticado baseando-se no token JWT, ficando dentro da pasta compartilhada src/middlewares, já que é um middleware de uso geral.

@Alecell Alecell converted this from a draft issue Apr 29, 2024
@alvarogfn alvarogfn changed the title [Auth] - Adicionar middleware de autenticação do JWT [Auth] - Criar módulo de autenticação JWT e middleware de verificação Apr 29, 2024
@yuri-silveiraa
Copy link
Contributor

eu quero!!!

@kvnbg kvnbg moved this from Todo to In Progress in Octopost Backend May 1, 2024
@kvnbg kvnbg added this to the [Auth] - Login milestone May 6, 2024
@kvnbg kvnbg mentioned this issue May 24, 2024
3 tasks
@kvnbg kvnbg moved this from In Progress to Pending Approval in Octopost Backend May 24, 2024
@kvnbg kvnbg closed this as completed in #94 Jun 12, 2024
@kvnbg kvnbg moved this from Pending Approval to Done in Octopost Backend Jun 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants