Skip to content

Backend app of a password manager app made in Java using Spring and PostgreSQL

License

Notifications You must be signed in to change notification settings

renatompf/password-manager

Repository files navigation

password-manager

Description:

This is the backend application of a password-manager when you are able to manage not only all your passwords and also notes. You can also generate your own random password if you want and check the strength of a password.

ALL YOUR PASSWORDS AND NOTES ARE ENCRYPTED BEFORE BEING STORED IN THE DATABASE, NOT ONLY TO GUARANTEE THE SECURITY OF IT BUT ALSO TO ENSURE THE PRIVACY OF THE USER

This project was made in JAVA 17, using Spring Security to manage the security and Spring Data JPA and PostgreSQL to handle all the data.

How to run it:

To run the entire project you must have Docker installed in you system. After you installed Docker, in case you didn't just run the command bellow in the root folder:

make run

To run tests, you can simply make:

make tests

When you want to stop it just make:

make stop

Endpoints:

WHEN USING THE ENDPOINTS DON'T FORGET TO USE THE JWT TOKEN GENERATED (AS A BEARER) IN THE AUTHENTICATION ENDPOINTS

Registration

  • POST request
localhost:8080/auth/register

Body example:

{
    "firstName": "Renato",
    "lastName": "Freire",
    "email": "[email protected]",
    "password": "password"
}

Login

  • POST request
localhost:8080/auth/login

Body example:

{
    "email": "[email protected]",
    "password": "password"
}

Refresh Token

  • POST request
localhost:8080/auth/refresh-token

Logout

  • POST request
localhost:8080/auth/logout

Generate Random Password:

(THIS API DOES NOT NEED AUTHENTICATION)

  • POST Request
localhost:8080/password-generator
Body example:
{
  "length": 16,
  "useLower": true,
  "useUpper": true,
  "useNumber": true,
  "useSpecials": true
}

Evaluate your password's strength:

(THIS API DOES NOT NEED AUTHENTICATION)

  • POST Request
localhost:8080/password-strength
Body example:
{
  "password": "(dtz%YJx4€B5@15@H8Vxc7@eAUz77]7{Y13)h"
}

Logins

Get all your logins

  • GET Request
localhost:8080/logins

Create a new logins

  • POST request
localhost:8080/logins

Body example:

{
    "name": "GITHUB LOGIN",
    "username": "exampleUsername",
    "password": "examplePassword",
    "url": "https://www.github.com",
    "description": "Credentials for personal github account"
}

Get a specific login:

  • GET request
localhost:8080/logins/{loginId}

Update a specific login:

  • PUT request
localhost:8080/logins/{loginId}

Body example:

{
  "name": "GITHUB LOGIN",
  "username": "exampleUsername2",
  "password": "examplePassword2",
  "url": "https://www.github.com",
  "description": "Credentials for personal github account"
}

Delete a specific login:

  • Delete request
localhost:8080/logins/{loginId}

Notes

Get all your notes

  • GET Request
localhost:8080/notes

Create a new note

  • POST request
localhost:8080/notes

Body example:

{
  "name": "Example Note",
  "description": "This is an example note."
}

Get a specific note:

  • GET request
localhost:8080/notes/{noteId}

Update a specific note:

  • PUT request
localhost:8080/notes/{noteId}

Body example:

{
  "name": "Update Example Note",
  "description": "This is an updated example note."
}

Delete a specific password:

  • Delete request
localhost:8080/notes/{noteId}

License

MIT License

About

Backend app of a password manager app made in Java using Spring and PostgreSQL

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages