{"id":27392229,"url":"https://github.com/choudharymahipal/jwtauthentication_dotnetcore","last_synced_at":"2025-04-13T21:18:20.843Z","repository":{"id":286659930,"uuid":"962106191","full_name":"choudharymahipal/JWTAuthentication_DotNetCore","owner":"choudharymahipal","description":"This project demonstrates how to implement JWT (JSON Web Token) authentication in a .NET Core application.","archived":false,"fork":false,"pushed_at":"2025-04-07T17:38:23.000Z","size":1018,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-13T21:18:17.622Z","etag":null,"topics":["asp-net-core","authentication","jwt"],"latest_commit_sha":null,"homepage":"","language":"CSS","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/choudharymahipal.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":"2025-04-07T16:53:31.000Z","updated_at":"2025-04-08T05:52:22.000Z","dependencies_parsed_at":"2025-04-07T18:40:47.594Z","dependency_job_id":"c95918c8-e9be-49b1-94fe-86669cf66ec5","html_url":"https://github.com/choudharymahipal/JWTAuthentication_DotNetCore","commit_stats":null,"previous_names":["choudharymahipal/jwtauthentication_dotnetcore"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/choudharymahipal%2FJWTAuthentication_DotNetCore","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/choudharymahipal%2FJWTAuthentication_DotNetCore/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/choudharymahipal%2FJWTAuthentication_DotNetCore/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/choudharymahipal%2FJWTAuthentication_DotNetCore/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/choudharymahipal","download_url":"https://codeload.github.com/choudharymahipal/JWTAuthentication_DotNetCore/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248782255,"owners_count":21160717,"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","authentication","jwt"],"created_at":"2025-04-13T21:18:20.275Z","updated_at":"2025-04-13T21:18:20.831Z","avatar_url":"https://github.com/choudharymahipal.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JWT Authentication in .NET Core\n\nThis project demonstrates how to implement JWT (JSON Web Token) authentication in a .NET Core application.\n\n## Features\n\n- User registration and login\n- Secure API endpoints with JWT authentication\n- Token generation and validation\n- Role-based access control\n\n## Prerequisites\n\n- [.NET Core SDK](https://dotnet.microsoft.com/download)\n- SQL Server or any compatible database\n\n## Getting Started\n\n1. Clone the repository:\n    ```bash\n    git clone https://github.com/choudharymahipal/JWTAuthentication_DotNetCore.git\n    cd JWTAuthentication_DotNetCore\n    ```\n\n2. Update the `appsettings.json` file with your database connection string and JWT settings.\n\n3. Apply migrations and update the database:\n    ```bash\n    dotnet ef database update\n    ```\n\n4. Run the application:\n    ```bash\n    dotnet run\n    ```\n\n5. Access the API at `https://localhost:5001`.\n\n## API Endpoints\n\n### Authentication\n\n- **POST** `/api/auth/register` - Register a new user\n- **POST** `/api/auth/login` - Authenticate and get a JWT token\n\n### Protected Endpoints\n\n- **GET** `/api/secure/data` - Access secure data (requires a valid token)\n\n## Technologies Used\n\n- .NET Core\n- Entity Framework Core\n- JWT Authentication\n- Swagger for API documentation\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n\n## Acknowledgments\n\n- [Microsoft Documentation](https://learn.microsoft.com/)\n- [JWT.io](https://jwt.io/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchoudharymahipal%2Fjwtauthentication_dotnetcore","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchoudharymahipal%2Fjwtauthentication_dotnetcore","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchoudharymahipal%2Fjwtauthentication_dotnetcore/lists"}