{"id":22268071,"url":"https://github.com/curityio/dotnet-api-jwt-validation","last_synced_at":"2026-04-29T11:01:28.892Z","repository":{"id":74437438,"uuid":"344402107","full_name":"curityio/dotnet-api-jwt-validation","owner":"curityio","description":"Code example of how to validate JWTs and authorize requests in a .NET API","archived":false,"fork":false,"pushed_at":"2024-12-09T07:41:47.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-01-30T13:29:08.028Z","etag":null,"topics":["api","claims","code-example","dotnet","jwt-validation","oauth2","scopes","zero-trust"],"latest_commit_sha":null,"homepage":"https://curity.io/resources/learn/dotnet-api/","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/curityio.png","metadata":{"files":{"readme":"README.rst","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":"2021-03-04T08:25:59.000Z","updated_at":"2024-12-09T07:41:51.000Z","dependencies_parsed_at":"2024-12-09T08:35:29.258Z","dependency_job_id":null,"html_url":"https://github.com/curityio/dotnet-api-jwt-validation","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/curityio%2Fdotnet-api-jwt-validation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/curityio%2Fdotnet-api-jwt-validation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/curityio%2Fdotnet-api-jwt-validation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/curityio%2Fdotnet-api-jwt-validation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/curityio","download_url":"https://codeload.github.com/curityio/dotnet-api-jwt-validation/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245485691,"owners_count":20623237,"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":["api","claims","code-example","dotnet","jwt-validation","oauth2","scopes","zero-trust"],"created_at":"2024-12-03T11:10:58.179Z","updated_at":"2026-04-29T11:01:23.681Z","avatar_url":"https://github.com/curityio.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"Validate JWTs in .NET\n=============================================\n\n.. image:: https://img.shields.io/badge/quality-experiment-red\n    :target: https://curity.io/resources/code-examples/status/\n\n.. image:: https://img.shields.io/badge/availability-source-blue\n    :target: https://curity.io/resources/code-examples/status/\n\nThis repository contains example code on how to use JWTs for authorization in .NET APIs. This will be managed using the `.NET Core Security Framework \u003chttps://learn.microsoft.com/en-us/aspnet/core/security/?view=aspnetcore-8.0/\u003e`_. This allows for easy annotation of an endpoint to specify authorization policies.\n\n::\n\n    [HttpGet(\"developer\")]\n    [Authorize(Policy = \"developer\")]\n    public IActionResult Developer()\n    {\n        ...\n    }\n\n\nThis repository contains the result of the `Securing .NET Core API with JWT \u003chttps://curity.io/resources/learn/dotnet-api/\u003e`_ article. That article contains more in-depth information about the source code.\n\nRun the example\n~~~~~~~~~~~~~~~~~~~\n\nUpdate the ``appsettings.json`` according to the article.\n\nThen run\n\n:: \n\n    dotnet restore\n    dotnet run\n\nContributing\n~~~~~~~~~~~~\n\nPull requests are welcome. To do so, just fork this repo, and submit a pull request.\n\nLicense\n~~~~~~~\n\nThe files and resources maintained in this repository are licensed under the `Apache 2 license \u003cLICENSE\u003e`_.\n\nMore Information\n~~~~~~~~~~~~~~~~\n\nPlease visit `curity.io \u003chttps://curity.io/\u003e`_ for more information about the Curity Identity Server.\n\nCopyright (C) 2021 Curity AB.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcurityio%2Fdotnet-api-jwt-validation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcurityio%2Fdotnet-api-jwt-validation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcurityio%2Fdotnet-api-jwt-validation/lists"}