{"id":24935162,"url":"https://github.com/sana-ullah305/quorixjwt","last_synced_at":"2026-05-11T03:15:30.583Z","repository":{"id":275204929,"uuid":"925399866","full_name":"sana-ullah305/QuorixJWT","owner":"sana-ullah305","description":"A secure and scalable ASP.NET Core API with JWT authentication, OAuth integration, and role-based authorization. This project demonstrates user management, external login providers, and claims-based access control.","archived":false,"fork":false,"pushed_at":"2025-01-31T20:22:04.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-28T15:15:04.512Z","etag":null,"topics":["aspnet-core","authentication","authorization","claims-based-authorization","dotnet","entity-framework-core","jwt-authentication","oauth","rest-api","role-based-authorization","security","sql-server","user-management"],"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/sana-ullah305.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2025-01-31T20:04:09.000Z","updated_at":"2025-01-31T20:24:50.000Z","dependencies_parsed_at":"2025-01-31T21:31:23.527Z","dependency_job_id":null,"html_url":"https://github.com/sana-ullah305/QuorixJWT","commit_stats":null,"previous_names":["sana-ullah305/quorixjwt"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sana-ullah305%2FQuorixJWT","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sana-ullah305%2FQuorixJWT/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sana-ullah305%2FQuorixJWT/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sana-ullah305%2FQuorixJWT/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sana-ullah305","download_url":"https://codeload.github.com/sana-ullah305/QuorixJWT/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246049633,"owners_count":20715511,"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":["aspnet-core","authentication","authorization","claims-based-authorization","dotnet","entity-framework-core","jwt-authentication","oauth","rest-api","role-based-authorization","security","sql-server","user-management"],"created_at":"2025-02-02T15:21:37.330Z","updated_at":"2026-05-11T03:15:30.542Z","avatar_url":"https://github.com/sana-ullah305.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ASP.NET Core Authentication and Authorization\n\nThis project is a secure and scalable ASP.NET Core application that demonstrates the following features:\n\n- **JWT Authentication**: Secure API endpoints using JSON Web Tokens (JWT).\n- **OAuth Integration**: Support for external login providers (e.g., Google, Facebook).\n- **Role-Based Authorization**: Manage user roles and permissions.\n- **Claims-Based Access Control**: Use claims for fine-grained authorization.\n- **User Management**: Register, login, and manage users with ASP.NET Core Identity.\n\n---\n\n## **Features**\n\n- **JWT Authentication**:\n  - Secure API endpoints using JWT tokens.\n  - Token expiration and validation.\n\n- **OAuth Integration**:\n  - Support for external login providers (e.g., Google, Facebook).\n  - Store external login tokens securely.\n\n- **Role-Based Authorization**:\n  - Assign roles to users (e.g., Admin, User).\n  - Restrict access to endpoints based on roles.\n\n- **Claims-Based Access Control**:\n  - Add custom claims to users (e.g., `Permission:CanEdit`).\n  - Use claims for fine-grained authorization.\n\n- **User Management**:\n  - Register new users with email and password.\n  - Login with email and password or external providers.\n  - Manage user roles and claims.\n\n---\n\n## **Technologies Used**\n\n- **ASP.NET Core**: Backend framework for building RESTful APIs.\n- **Entity Framework Core**: ORM for database interactions.\n- **JWT**: JSON Web Tokens for authentication.\n- **OAuth**: Integration with external login providers.\n- **SQL Server**: Database for storing user and role information.\n\n---\n\n## **Getting Started**\n\n### **Prerequisites**\n\n- [.NET 9 SDK](https://dotnet.microsoft.com/download/dotnet/9.0)\n- [SQL Server](https://www.microsoft.com/en-us/sql-server/sql-server-downloads)\n- [Visual Studio 2022](https://visualstudio.microsoft.com/vs/) or [Visual Studio Code](https://code.visualstudio.com/)\n\n### **Setup**\n\n1. **Clone the Repository**:\n   ```bash\n   git clone https://github.com/sana-ullah305/QuorixJWT.git\n   cd QuorixJWT\n   ```\n\n2. **Configure the Database**:\n   - Update the connection string in `appsettings.json`:\n     ```json\n     \"ConnectionStrings\": {\n       \"DefaultConnection\": \"Server=(localdb)\\\\MSSQLLocalDB;Database=QuorixJWT;Trusted_Connection=True;TrustServerCertificate=True;\"\n     }\n     ```\n   - Run migrations to create the database:\n     ```bash\n     dotnet ef database update\n     ```\n\n3. **Configure JWT and OAuth**:\n   - Update the `Jwt` and `OAuth` settings in `appsettings.json`:\n     ```json\n     \"Jwt\": {\n       \"Issuer\": \"https://localhost:5001\",\n       \"Audience\": \"https://localhost:5001\",\n       \"SecretKey\": \"YOUR_SECRET_KEY\",\n       \"ExpiryInMinutes\": 60\n     },\n     \"OAuth\": {\n       \"ClientId\": \"YOUR_CLIENT_ID\",\n       \"ClientSecret\": \"YOUR_CLIENT_SECRET\",\n       \"CallbackPath\": \"/signin-oauth\",\n       \"AuthorizationEndpoint\": \"https://your-auth-provider.com/authorize\",\n       \"TokenEndpoint\": \"https://your-auth-provider.com/token\"\n     }\n     ```\n\n4. **Run the Application**:\n   ```bash\n   dotnet run\n   ```\n\n---\n\n## **API Endpoints**\n\n| Method | Endpoint                  | Description                              |\n|--------|---------------------------|------------------------------------------|\n| POST   | `/api/Account/Register`   | Register a new user.                     |\n| POST   | `/api/Account/Login`      | Login and receive a JWT token.           |\n| POST   | `/api/Account/Logout`     | Logout the current user.                 |\n| GET    | `/api/Account/UserInfo`   | Get information about the current user.  |\n| POST   | `/api/Account/AddExternalLogin` | Add an external login provider.     |\n| POST   | `/api/Account/RemoveLogin`| Remove an external login provider.       |\n| GET    | `/api/Account/ManageInfo` | Get user roles and external login info.  |\n\n---\n\n## **License**\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n\n---\n\n## **Contributing**\n\nContributions are welcome! Please follow these steps:\n\n1. Fork the repository.\n2. Create a new branch (`git checkout -b feature/YourFeature`).\n3. Commit your changes (`git commit -m 'Add some feature'`).\n4. Push to the branch (`git push origin feature/YourFeature`).\n5. Open a pull request.\n\n---\n\n## **Acknowledgments**\n\n- [ASP.NET Core Documentation](https://learn.microsoft.com/en-us/aspnet/core/)\n- [JWT.io](https://jwt.io/)\n- [OAuth 2.0](https://oauth.net/2/)\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsana-ullah305%2Fquorixjwt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsana-ullah305%2Fquorixjwt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsana-ullah305%2Fquorixjwt/lists"}