{"id":22819801,"url":"https://github.com/benscabbia/identityserver4-dockersample-dotnetcore-nginx","last_synced_at":"2026-02-15T07:37:05.270Z","repository":{"id":92930566,"uuid":"169202278","full_name":"benscabbia/identityserver4-dockersample-dotnetcore-nginx","owner":"benscabbia","description":"IdentityServer4, ASP.NET Core, NGINX, HTTPS, Docker Compose","archived":false,"fork":false,"pushed_at":"2019-03-03T15:47:42.000Z","size":9,"stargazers_count":12,"open_issues_count":0,"forks_count":5,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-04T02:46:31.091Z","etag":null,"topics":["asp-net-core","containers","docker","docker-compose","https","identityserver4","nginx"],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/benscabbia.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,"zenodo":null}},"created_at":"2019-02-05T07:02:14.000Z","updated_at":"2023-02-23T11:23:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"8eb8b192-f176-4471-92f1-ffd8816e485e","html_url":"https://github.com/benscabbia/identityserver4-dockersample-dotnetcore-nginx","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/benscabbia/identityserver4-dockersample-dotnetcore-nginx","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benscabbia%2Fidentityserver4-dockersample-dotnetcore-nginx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benscabbia%2Fidentityserver4-dockersample-dotnetcore-nginx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benscabbia%2Fidentityserver4-dockersample-dotnetcore-nginx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benscabbia%2Fidentityserver4-dockersample-dotnetcore-nginx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/benscabbia","download_url":"https://codeload.github.com/benscabbia/identityserver4-dockersample-dotnetcore-nginx/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benscabbia%2Fidentityserver4-dockersample-dotnetcore-nginx/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29472883,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-15T06:58:05.414Z","status":"ssl_error","status_checked_at":"2026-02-15T06:58:05.085Z","response_time":118,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["asp-net-core","containers","docker","docker-compose","https","identityserver4","nginx"],"created_at":"2024-12-12T15:14:19.843Z","updated_at":"2026-02-15T07:37:05.265Z","avatar_url":"https://github.com/benscabbia.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# identityserver4-dockersample-dotnetcore-nginx\n\nA starter project for the following tech stack:\n\n- [IdentityServer4](http://docs.identityserver.io/en/latest/)\n- ASP.NET Core\n- NGINX\n- HTTPS\n- Docker\n\n## Get Started\n\n```\ndocker-compose up\n```\n\nYou can make http requests. For this, I use [postman](https://www.getpostman.com/):\n\nGet the openid configuration:\n\n```\nGET https://localhost/authentication/.well-known/openid-configuration\n```\n\nGet an access token:\n\n```\nPOST https://localhost/authentication/connect/token\n--- Request Body ---\nclient_id=SampleApp.Mobile\nclient_secret=secret\nusername=ben\npassword=password\nscope=openid SampleApp.API\ngrant_type=password\n```\n\nResponse:\n\n```json\n{\n  \"access_token\": \"token\",\n  \"expires_in\": 2592000,\n  \"token_type\": \"Bearer\"\n}\n```\n\nYou can now make requests against the API:\n\n```\nGET https://localhost/api/identity\n--- Headers ---\nAuthorization: Bearer token\n```\n\nIf you don't add the `Authorization` header, you will get a 401.\n\n## Debugging the app\n\nDocker is set up to only run the app. To debug this, you will need to change the following lines:\n\nIn SampleApp.Authentication/Startup.cs, comment out the line like below:\n\n```csharp\n// options.PublicOrigin = \"http://localhost:4000\";\n```\n\nIn SampleApp.API/Startup.cs, replace the `Authority`:\n\n```csharp\nAddIdentityServerAuthentication(options =\u003e\n{\n    options.Authority = \"http://localhost:4000/authentication\";\n    options.RequireHttpsMetadata = false;\n    options.ApiName = \"SampleApp.API\";\n});\n```\n\nIn a real project, you would set these values in a configuration file, so you might have something like:\n\n- `appsettings.json` - development configurations\n- `appsettings.Staging.json` - docker development configuration\n- `appsettings.Production.json` - docker production configurations\n\nYou would then want to reproduce this pattern for `nginx.conf`, `docker-compose` and `Dockerfile`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenscabbia%2Fidentityserver4-dockersample-dotnetcore-nginx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbenscabbia%2Fidentityserver4-dockersample-dotnetcore-nginx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenscabbia%2Fidentityserver4-dockersample-dotnetcore-nginx/lists"}