{"id":51129954,"url":"https://github.com/osisdie/dotnet-webapi-auth-boilerplate","last_synced_at":"2026-06-25T11:01:32.331Z","repository":{"id":92649095,"uuid":"359124710","full_name":"osisdie/dotnet-webapi-auth-boilerplate","owner":"osisdie","description":"Production-ready .NET WebAPI with JWT authentication, refresh tokens, Dapper ORM, Redis caching — powered by CoreFX SDK","archived":false,"fork":false,"pushed_at":"2026-03-24T13:57:58.000Z","size":121,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-25T17:47:39.972Z","etag":null,"topics":["authentication","boilerplate","corefx","dapper","docker","dotnet","jwt","kubernetes","redis","swagger","webapi"],"latest_commit_sha":null,"homepage":null,"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/osisdie.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-04-18T11:29:48.000Z","updated_at":"2026-03-24T13:58:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"bfb29e7f-be20-47ce-8be9-99b1994ef8eb","html_url":"https://github.com/osisdie/dotnet-webapi-auth-boilerplate","commit_stats":null,"previous_names":["osisdie/dotnet-webapi-auth-boilerplate"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/osisdie/dotnet-webapi-auth-boilerplate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osisdie%2Fdotnet-webapi-auth-boilerplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osisdie%2Fdotnet-webapi-auth-boilerplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osisdie%2Fdotnet-webapi-auth-boilerplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osisdie%2Fdotnet-webapi-auth-boilerplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/osisdie","download_url":"https://codeload.github.com/osisdie/dotnet-webapi-auth-boilerplate/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osisdie%2Fdotnet-webapi-auth-boilerplate/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34771664,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-25T02:00:05.521Z","response_time":101,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["authentication","boilerplate","corefx","dapper","docker","dotnet","jwt","kubernetes","redis","swagger","webapi"],"created_at":"2026-06-25T11:01:30.407Z","updated_at":"2026-06-25T11:01:32.325Z","avatar_url":"https://github.com/osisdie.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dotnet-webapi-auth-boilerplate\n\n[![CI](https://github.com/osisdie/dotnet-webapi-auth-boilerplate/actions/workflows/ci.yml/badge.svg)](https://github.com/osisdie/dotnet-webapi-auth-boilerplate/actions/workflows/ci.yml)\n[![.NET 8](https://img.shields.io/badge/.NET-8.0%20LTS-512bd4)](https://dotnet.microsoft.com/download/dotnet/8.0)\n[![.NET 10](https://img.shields.io/badge/.NET-10.0-512bd4)](https://dotnet.microsoft.com/download/dotnet/10.0)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)\n\nProduction-ready .NET WebAPI with JWT authentication, refresh tokens, Dapper ORM, and Redis caching — powered by [CoreFX SDK](https://github.com/osisdie/dotnet-corefx-sdk).\n\n## Features\n\n- **JWT Authentication** — Login, access tokens (60 min), refresh tokens (180 min)\n- **Multi-target** — Supports both .NET 8.0 LTS and .NET 10.0\n- **Redis Caching** — `IDistributedCache` with StackExchange.Redis and failback scoring\n- **Dapper ORM** — Async database access with SQL Server\n- **Log4net Logging** — Console, file, and AWS CloudWatch support\n- **Middleware Pipeline** — Exception handling, JWT authorization, request/response logging\n- **Swagger/OpenAPI** — Versioned API docs (v202603, v202104, v202103)\n- **Health Checks** — Built-in `/health` endpoint\n- **Docker \u0026 K8s** — Multi-stage Dockerfile and minikube manifests\n- **Configuration** — Environment-based (Debug/Development/Testing/Staging/Production)\n- **FluentValidation** — Request data validation\n- **xUnit Testing** — Unit and integration test projects\n\n## Prerequisites\n\n- [.NET 8.0 SDK](https://dotnet.microsoft.com/download/dotnet/8.0) or [.NET 10.0 SDK](https://dotnet.microsoft.com/download/dotnet/10.0)\n- [Redis](https://redis.io/) (optional, for caching features)\n- [Docker](https://www.docker.com/) (optional, for container deployment)\n\n## Quick Start\n\n```bash\n# Clone\ngit clone https://github.com/osisdie/dotnet-webapi-auth-boilerplate.git\ncd dotnet-webapi-auth-boilerplate\n\n# Set required env var\nexport COREFX_API_NAME=auth-dev\n\n# Build \u0026 Run\ndotnet build auth-api-all-projects.sln\ndotnet run --project src/Endpoint/Hello6/Hello6.Domain.Endpoint.csproj\n\n# Browse\n# http://localhost:5006/swagger\n# http://localhost:5006/health\n```\n\n## Projects\n\n**Hello6.Domain.Endpoint** is the primary web application wrapping all dependent projects:\n\n- **CoreFX** — Shared framework libraries\n  - CoreFX.Abstractions, CoreFX.Common, CoreFX.Hosting\n  - CoreFX.Auth, CoreFX.Caching.Redis, CoreFX.Logging.Log4net\n  - CoreFX.Notification.Smtp\n\n- **Hello6** — Domain-driven design services\n  - Hello6.Domain.Common, Hello6.Domain.Contract\n  - Hello6.Domain.DataAccess.Database, Hello6.Domain.SDK\n\n## API Endpoints\n\n| Endpoint | Description |\n|----------|-------------|\n| `GET /health` | Health check |\n| `GET /api/echo/ver` | Service version |\n| `GET /api/echo/config` | Configuration status |\n| `GET /api/echo/db` | Database connection check |\n| `GET /api/echo/cache` | Redis cache check |\n| `POST /api/auth/login` | JWT login |\n| `POST /api/auth/refreshtoken` | Refresh JWT token |\n\n## Docker\n\n```bash\nexport VERSION=$(cat src/Endpoint/Hello6/.version | head -n1)\nexport IMAGE_HOST=docker.io/[ACCOUNT-ID]\n\nbash dockerbuild.sh\n```\n\n## Testing\n\n```bash\n# Unit tests\ndotnet test auth-api-all-projects.sln -c Release\n\n# Integration test (requires running service)\nexport ASPNETCORE_ENVIRONMENT=Development\nexport CI_TEST_ENDPOINT=http://localhost:5006\ndotnet test tests/IntegrationTest/Hello6/IntegrationTest.Hello6.csproj -c Release\n```\n\n## See Also\n\n- [dotnet-corefx-sdk](https://github.com/osisdie/dotnet-corefx-sdk) — The reusable CoreFX framework\n- [dotnet-minikube-boilerplate](https://github.com/osisdie/dotnet-minikube-boilerplate) — K8s deployment focused\n- [dotnet-mediatr-boilerplate](https://github.com/osisdie/dotnet-mediatr-boilerplate) — MediatR/CQRS focused\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fosisdie%2Fdotnet-webapi-auth-boilerplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fosisdie%2Fdotnet-webapi-auth-boilerplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fosisdie%2Fdotnet-webapi-auth-boilerplate/lists"}