{"id":21057827,"url":"https://github.com/iitoneloc/web-app-auth-server","last_synced_at":"2025-03-14T00:27:08.362Z","repository":{"id":92704247,"uuid":"581724031","full_name":"iiTONELOC/web-app-auth-server","owner":"iiTONELOC","description":"Basic web auth app service written in C#","archived":false,"fork":false,"pushed_at":"2023-01-08T14:55:03.000Z","size":188,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-20T19:34:59.697Z","etag":null,"topics":["asp-net-core","csharp","jwt"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iiTONELOC.png","metadata":{"files":{"readme":"README.MD","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-24T04:43:27.000Z","updated_at":"2022-12-24T04:54:17.000Z","dependencies_parsed_at":"2023-04-23T15:17:18.641Z","dependency_job_id":null,"html_url":"https://github.com/iiTONELOC/web-app-auth-server","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iiTONELOC%2Fweb-app-auth-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iiTONELOC%2Fweb-app-auth-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iiTONELOC%2Fweb-app-auth-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iiTONELOC%2Fweb-app-auth-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iiTONELOC","download_url":"https://codeload.github.com/iiTONELOC/web-app-auth-server/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243502340,"owners_count":20301035,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["asp-net-core","csharp","jwt"],"created_at":"2024-11-19T17:04:51.458Z","updated_at":"2025-03-14T00:27:08.354Z","avatar_url":"https://github.com/iiTONELOC.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Web-App Authentication Server\n\n## _Coming Soon_\n\n---\n\nThe Web App Authentication Server is written in C# and securely authenticates users for all your applications.\n\n## Features\n\n- HTTPS by default\n- **_MongoDB_** for data persistence.\n- Passwords are not stored in plain text.\n- All fields are validated prior to model mutation.\n- Acts as a SSO for your family of connected applications.\n- **_JSON Web Tokens_** are used for claim and session management.\n\nWhile this project can be reused, it is purposefully created to act as an authentication microservice for my projects and personal applications.\n\n![Auth-secure](./assets/images/auth-secure.jpg)\n\n## Table of Contents\n\n[Installation](#installation)\n\n[Usage](#usage)\n\n[Screenshot](#screenshot)\n\n[Demo](#demo)\n\n[Contact](#contact)\n\n[License](#license)\n\n## Installation\n\n_`To build a local copy`_:\n\n1. **Clone the repo**:\n\n- Navigate to a directory where you would like to save this project and clone the repository:\n\n  ```bash\n  git clone https://github.com/iiTONELOC/web-app-auth-server.git\n  ```\n\n2. **Ensure you have MongoDB, Mongosh, and the DotNET SDK installed on your system**:\n\n- Covering the installation steps for these prerequisites is beyond the scope of this README, use the links below to find the relevant installation instructions for your system.\n\n- [_Download MongoDB Community_](https://www.mongodb.com/try/download/community)\n\n  - [_MongoDB Installation Guides_](https://www.mongodb.com/docs/manual/installation/#mongodb-installation-tutorials)\n\n- [_Download Mongosh_](https://www.mongodb.com/try/download/shell)\n\n  - [_Mongosh_](https://www.mongodb.com/docs/mongodb-shell/install/)\n\n- [_DotNET Download Link_](https://dotnet.microsoft.com/en-us/download)\n\n  I recommend having both versions but the 6.0 SDK will be needed for this project.\n\n  - [_DotNET Installation Guides - Windows_](https://learn.microsoft.com/en-us/dotnet/framework/install/)\n\n  - [_DotNET Installation - Linux_](https://learn.microsoft.com/en-us/dotnet/core/install/linux)\n\n  - [_DotNET Installation - macOS_](https://learn.microsoft.com/en-us/dotnet/core/install/macos)\n\n3. **Create your environment variables**:\n\n   ```bash\n   cd web-app-auth-server\n\n   # Create the empty JSON file\n   # Windows Powershell\n   New-Item .env -ItemType file\n\n   # Mac or Linux\n   touch .env\n   ```\n\n4. **Add your desired settings**\n\n   Copy the below settings to the newly created .env file and\n   Replace `\u003cWhatever\u003e` with your information\n\n   ```env\n   ConnectionString = \u003cMongoConnectionString\u003e\n\n   # pick existing or make up your own\n   DatabaseName = \u003cDBName\u003e\n\n   # pick existing or make up your own\n   UserCollectionName = \u003cUsersCollectionName\u003e\n\n   AllowedHosts = \u003cList of Hosts\u003e\n   JWTUserKey1 = \u003cURL-Safe Secret\u003e\n   MasterKey = \u003c255-bit URL-Safe Secret\u003e\n   ApprovedKeyList = \u003cComma separated list of App Access Keys\u003e\n   ```\n\n5. **Configure Mongo using Mongosh**:\n\n   Open a new terminal and bring up the Mongosh Shell:\n\n   ```bash\n   mongosh\n\n   #create a database using the DatabaseName from the app settings\n   use \u003cDatabaseName\u003e\n\n   db.createCollection('\u003cUserCollectionName\u003e')\n\n   #exit mongosh\n   exit\n\n   #close terminal\n   exit\n   ```\n\n6. **Build the project**\n\n   ```bash\n   dotnet build\n   ```\n\n7. **Run the development server**\n\n   ```bash\n    dotnet run\n   ```\n\n## Usage\n\nThe Web Authentication Sever acts as a central datastore for your connected applications and accepts JSON.\n\nUser JSON data must adhere to the following specifications to interact with the API :\n\n### Data Requirements\n\n```json\n// UserModel Schema\n{\n    \"_id\": String,\n    \"username\": String!,\n    \"password\": String!,\n    \"email\": String!\n}\n```\n\n`Usernames` must meet the following conditions:\n\n- Must be an alpha-numeric string\n- Be between 3 and 20 characters\n- Cannot contain white-space\n- Must be unique\n\n`Passwords` must meet the following conditions:\n\n- Must be a string\n- Must be between 8 and 20 characters\n- Cannot contain white-space\n- Must have one uppercase letter\n- Must have one lowercase letter\n- Must have a number\n- Must have a special character:\n  `` !@#$%^\u0026*)}[|/.+=}(]?_~`-;: ``\n\n`Email Addresses` must meet the following conditions:\n\n- Must be a string\n- Must be less than 150 characters\n- Must be a valid email address\n- Must be unique\n\n## Screenshot\n\n![Create-user](./assets/images/createuser-success.png)\n\n_Image demonstrates successfully creating a user from the `api/user` endpoint_\n\n## Demo\n\nComing Soon!\n\n## Contact\n\nIf you have any questions about this project or wish to connect please feel free to send me an email! [AnthonyTropeano@protonmail.com](mailto:AnthonyTropeano@protonmail.com)\n\n## LICENSE\n\nThis project is licensed by the MIT license and a copy can be found here: [click to view license agreement](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiitoneloc%2Fweb-app-auth-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiitoneloc%2Fweb-app-auth-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiitoneloc%2Fweb-app-auth-server/lists"}