https://github.com/toulisdev/passwordmanagerrestapi
A simple example of a Rest-API that works as a login system. I used a Password Manager application as an example
https://github.com/toulisdev/passwordmanagerrestapi
api api-rest argon argon2 asp-net-core aspnetcore csharp dotnet dotnet-core password-manager rest-api swagger-ui
Last synced: about 1 year ago
JSON representation
A simple example of a Rest-API that works as a login system. I used a Password Manager application as an example
- Host: GitHub
- URL: https://github.com/toulisdev/passwordmanagerrestapi
- Owner: ToulisDev
- License: apache-2.0
- Created: 2022-08-30T10:21:12.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-08-30T16:12:51.000Z (almost 4 years ago)
- Last Synced: 2025-01-26T19:11:13.342Z (over 1 year ago)
- Topics: api, api-rest, argon, argon2, asp-net-core, aspnetcore, csharp, dotnet, dotnet-core, password-manager, rest-api, swagger-ui
- Language: C#
- Homepage:
- Size: 68.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# A Password Manager Rest API Example
[![Issues][issues-shield]][issues-url]
[![APACHE 2.0 License][license-shield]][license-url]
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
## About The Project
[![PM REST-API Swagger Screenshot][product-screenshot]](http://localhost:730/swagger/index.html)
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.
### Built With
* [![C#][CSharp]][CSharp-url]
* [![.Net][dotNet]][dotNet-url]
* [![VisualStudio][VisualStudio]][VisualStudio-url]
* [![MSSqlServer][MSSqlServer]][MSSqlServer-url]
## 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
* Microsoft SQL Server
* [SQL Server on Linux](https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-overview?view=sql-server-ver16)
* [SQL Server installation guide](https://docs.microsoft.com/en-us/sql/database-engine/install-windows/install-sql-server?view=sql-server-ver16)
* [Visual Studio](https://visualstudio.microsoft.com/)
### Installation
1. Download and Install MS SQL Server.
2. Create a Database
```sql
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.
```c#
app.Urls.Add("http://localhost:730");
```
8. Build project using *Publish* feature of Visual Studio for the host OS.
## 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.
## 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
## License
Distributed under the APACHE 2.0 License. See `LICENSE` for more information.
## Contact
Aggelos S. - aggelos_sachtouris@hotmail.com
Project Link: [https://github.com/ToulisDev/PasswordManagerRestApi](https://github.com/ToulisDev/PasswordManagerRestApi)
[issues-shield]: https://img.shields.io/github/issues/ToulisDev/PasswordManagerRestApi?style=for-the-badge
[issues-url]: https://github.com/ToulisDev/PasswordManagerRestApi/issues
[license-shield]: https://img.shields.io/github/license/ToulisDev/PasswordManagerRestApi?style=for-the-badge
[license-url]: https://github.com/ToulisDev/PasswordManagerRestApi/blob/main/LICENSE
[product-screenshot]: images/screenshot.png
[VisualStudio]: https://img.shields.io/badge/Visual_Studio-5C2D91?style=for-the-badge&logo=visual%20studio&logoColor=white
[VisualStudio-url]: https://visualstudio.microsoft.com/
[dotNet]: https://img.shields.io/badge/.NET-5C2D91?style=for-the-badge&logo=.net&logoColor=white
[dotNet-url]: https://dotnet.microsoft.com/en-us/
[CSharp]: https://img.shields.io/badge/C%23-239120?style=for-the-badge&logo=c-sharp&logoColor=white
[CSharp-url]: https://docs.microsoft.com/en-us/dotnet/csharp/
[MSSqlServer]: https://img.shields.io/badge/Microsoft_SQL_Server-CC2927?style=for-the-badge&logo=microsoft-sql-server&logoColor=white
[MSSqlServer-url]: https://www.microsoft.com/en-us/sql-server/