Skip to content

A simple example of a Rest-API that works as a login system. I used a Password Manager application as an example

License

Notifications You must be signed in to change notification settings

ToulisDev/PasswordManagerRestApi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A Password Manager Rest API Example

Issues APACHE 2.0 License


Logo

Password Manager Rest-Api

A REST-API that communicates between the user and a simple Microsoft SQL Database.
Explore the docs »

Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Contributing
  5. License
  6. Contact

About The Project

PM REST-API Swagger Screenshot

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.

(back to top)

Built With

  • C#
  • .Net
  • VisualStudio
  • MSSqlServer

(back to top)

Getting Started

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.

Prerequisites

Installation

  1. Download and Install MS SQL Server.

  2. Create a Database

    CREATE DATABASE YourDatabaseName;
  3. 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
  4. Create and assign the following Stored Procedures to the Database you just created.

    • validateLoginCreds
    • registerLoginCreds
    • createPassword
    • getallPasswords
    • getSpecPassword
    • updatePassword
    • deletePasswordNote
    • existantPasswordNote
  5. Create a Login User with above stored procedure exec permission only and assign him to the database you just created.

  6. Open VS Studio and open the above project.

  7. Replace appsettings.json with your corresponding info and Replace on Program.cs with your port and IP.

    app.Urls.Add("http://localhost:730");
  8. Build project using Publish feature of Visual Studio for the host OS.

(back to top)

Usage

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.

(back to top)

Contributing

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!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the APACHE 2.0 License. See LICENSE for more information.

(back to top)

Contact

Aggelos S. - aggelos_sachtouris@hotmail.com

Project Link: https://github.com/ToulisDev/PasswordManagerRestApi

(back to top)

About

A simple example of a Rest-API that works as a login system. I used a Password Manager application as an example

Topics

Resources

License

Stars

Watchers

Forks

Languages