{"id":25566527,"url":"https://github.com/pdmlab/scopeauthorizationrequirement","last_synced_at":"2026-03-16T09:30:17.278Z","repository":{"id":55075260,"uuid":"328254640","full_name":"PDMLab/ScopeAuthorizationRequirement","owner":"PDMLab","description":"Scope Claim authorization Requirement for ASP.NET Core","archived":false,"fork":false,"pushed_at":"2021-01-15T01:19:40.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-03T23:36:17.499Z","etag":null,"topics":["asp-net-core","authorization","claims","jwt","oidc","scopes"],"latest_commit_sha":null,"homepage":"https://www.nuget.org/packages/ScopeAuthorizationRequirement/","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/PDMLab.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}},"created_at":"2021-01-09T22:03:16.000Z","updated_at":"2021-01-12T17:52:25.000Z","dependencies_parsed_at":"2022-08-14T11:20:12.105Z","dependency_job_id":null,"html_url":"https://github.com/PDMLab/ScopeAuthorizationRequirement","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/PDMLab%2FScopeAuthorizationRequirement","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PDMLab%2FScopeAuthorizationRequirement/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PDMLab%2FScopeAuthorizationRequirement/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PDMLab%2FScopeAuthorizationRequirement/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PDMLab","download_url":"https://codeload.github.com/PDMLab/ScopeAuthorizationRequirement/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239927238,"owners_count":19719827,"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","authorization","claims","jwt","oidc","scopes"],"created_at":"2025-02-20T22:33:01.638Z","updated_at":"2026-03-16T09:30:17.212Z","avatar_url":"https://github.com/PDMLab.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ScopeAuthorizationRequirement\nThis package provides a `scope` claim authorization requirement for ASP.NET Core.\n\nIt handles multiple space delimited `scope` claims according to https://tools.ietf.org/html/rfc6749#section-3.3 (which the ASP.NET Core `RequireClaim` Requirement does not, hence can't be used e.g. with AWS Cognito when using multiple scopes).\n\n## Installation\n\n```bash\ndotnet add package ScopeAuthorizationRequirement\n```\n\n## Usage\n\n### Single scope required\n\n```csharp\nservices.AddAuthorization(options =\u003e\n{\n    options.AddPolicy(\"openid\", policy =\u003e\n    {\n        policy.RequireAuthenticatedUser();\n        policy.RequireScope(\"openid\");\n    });\n});\n```\n\n### Multiple scopes required\n\n```csharp\nservices.AddAuthorization(options =\u003e\n{\n    options.AddPolicy(\"openid+profile\", policy =\u003e\n    {\n        policy.RequireAuthenticatedUser();\n        policy.RequireScopes(NonEmptyList.Create(\"openid\", \"profile\"));\n    });\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpdmlab%2Fscopeauthorizationrequirement","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpdmlab%2Fscopeauthorizationrequirement","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpdmlab%2Fscopeauthorizationrequirement/lists"}