A REST-API that communicates between the user and a simple Microsoft SQL Database.
Explore the docs »
Report Bug
·
Request Feature
Table of Contents
This project is a simple REST-API for a password manager application. It is a simple login system with create and update passwords. The login system uses Argon algorithm to validate and create passwords.
In order to get up and running the Rest-API, you need to build the project using VS Studio for the corresponding OS (Linux or Windows). You will also have to update appsettings.json
with your personal settings. You might also want to change the port that the app is listening to via Program.cs
. The API was built to communicate with MS SQL Database, so you have to setup a database using MSSQL or you could implement and change the code to work with your Database.
- Microsoft SQL Server
- Visual Studio
-
Download and Install MS SQL Server.
-
Create a Database
CREATE DATABASE YourDatabaseName;
-
Create the following tables and columns inside the Database you just created.
PASSWORDS
Table- PASSWORDS_ID
- PASSWORDS_SITE
- PASSWORDS_USERNAME
- PASSWORDS_PASSWORD
- PASSWORDS_WEBSITE
- PASSWORDS_INSERT_DATE
- USER_ID
USERS
Table- USER_ID
- USERNAME
- PASSWORD
- INSERT_DATE
-
Create and assign the following Stored Procedures to the Database you just created.
- validateLoginCreds
- registerLoginCreds
- createPassword
- getallPasswords
- getSpecPassword
- updatePassword
- deletePasswordNote
- existantPasswordNote
-
Create a Login User with above stored procedure exec permission only and assign him to the database you just created.
-
Open VS Studio and open the above project.
-
Replace
appsettings.json
with your corresponding info and Replace onProgram.cs
with your port and IP.app.Urls.Add("http://localhost:730");
-
Build project using Publish feature of Visual Studio for the host OS.
Every communication is using POST Requests. In order to use requests such as GetPasswords
and UpdatePassword
, you need to get an authorization token first using Auth/login
post Request.
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the APACHE 2.0 License. See LICENSE
for more information.
Aggelos S. - aggelos_sachtouris@hotmail.com
Project Link: https://github.com/ToulisDev/PasswordManagerRestApi