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

Feature: Add JWT #389

Merged
merged 3 commits into from
Sep 24, 2023
Merged

Feature: Add JWT #389

merged 3 commits into from
Sep 24, 2023

Conversation

joaomfiumari
Copy link
Collaborator

@joaomfiumari joaomfiumari commented Dec 20, 2022

Summary

  • Adds JWT token creation on user login (server-side)
  • JWT interceptor on frontend so we can have the token added to every call done to the API
  • JWT validation middleware on server-side

JWT: JSON Web Tokens



user.token = jwt.sign({ id: user.userId }, SecretToken, {
expiresIn: 86400
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

1 day

.put("/:modelId/rename", rename)
.get("/:modelId/export", exportModel)
.post("/import", importModel);
.get("/",validateJWT, listAll)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

let me know if this validation is not needed in any of those endpoints, or if I missed any

@idmarjr
Copy link
Collaborator

idmarjr commented Dec 26, 2022

So,... I'm not the best person to review this pull request 😓
@miltonbsn can you take a look? 😄

@miltonbsn miltonbsn changed the base branch from development to main September 17, 2023 02:24
miltonbsn
miltonbsn previously approved these changes Sep 17, 2023
Copy link
Member

@miltonbsn miltonbsn left a comment

Choose a reason for hiding this comment

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

Amazing job here @joaomfiumari! I am sorry I took so long to review it.
This pull request improves drastically our session management, we really appreciate your effort.

@miltonbsn miltonbsn self-assigned this Sep 17, 2023
@idmarjr idmarjr changed the title Feature - Add JWT Feature: Add JWT Sep 17, 2023
@miltonbsn miltonbsn merged commit 680f141 into main Sep 24, 2023
@miltonbsn miltonbsn deleted the feature/add-jwt branch September 24, 2023 19:30
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.

3 participants