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

refatoração da segurança #71

Open
2 tasks
Luanftg opened this issue Apr 7, 2023 · 0 comments · Fixed by #68
Open
2 tasks

refatoração da segurança #71

Luanftg opened this issue Apr 7, 2023 · 0 comments · Fixed by #68
Assignees
Labels
refact refatoração de código pré existente Sprint lll desenvolvimentos para Sprint lll

Comments

@Luanftg
Copy link
Collaborator

Luanftg commented Apr 7, 2023

Refatoração dos Middlewares de segurança

Atualmente os controladores declarados seguros possuem em sua lista de middlewares, dois em especial: authorization e verifyJWT.

  • O Primeiro verifica a existência de um token no headers e inscreve o resultado da validação desse token na chave 'jwt' no context da requisição.
  • O segundo verifica o resultado da validação e se != de null , verifica permissão do token para acessar a rota pretendida através da chave 'role'.

Problema

Atualmente os middlewares de segurança estão sendo executados tantas vezes quanto o número de controladores declarados seguros.

Atividades

  • declarar passagem dos middlewares de segurança globalmente
  • criar validação para permitir acesso as rotas públicas
    • GET jobs
      • jobs?
      • jobs/id/
    • POST login
    • GET companies-image
@Luanftg Luanftg self-assigned this Apr 7, 2023
@Luanftg Luanftg converted this from a draft issue Apr 7, 2023
@Luanftg Luanftg added refact refatoração de código pré existente Sprint lll desenvolvimentos para Sprint lll labels Apr 7, 2023
@Luanftg Luanftg added this to the Entrega Sprint lll milestone Apr 7, 2023
@Luanftg Luanftg moved this from Todo Back to In Progress in APP_VAGAS_FLUTTER Apr 7, 2023
@Luanftg Luanftg linked a pull request Apr 7, 2023 that will close this issue
2 tasks
@Luanftg Luanftg moved this from In Progress to Tests in APP_VAGAS_FLUTTER Apr 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refact refatoração de código pré existente Sprint lll desenvolvimentos para Sprint lll
Projects
Status: Tests
Development

Successfully merging a pull request may close this issue.

1 participant