Created
November 28, 2021 15:31
-
-
Save nmchenry01/e6bdf39af49b380c2396170cd8d295ab to your computer and use it in GitHub Desktop.
HasScopeRequirement from https://auth0.com/docs/quickstart/backend/aspnet-core-webapi/01-authorization#validate-scopes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class HasScopeRequirement : IAuthorizationRequirement | |
{ | |
public string Issuer { get; } | |
public string Scope { get; } | |
public HasScopeRequirement(string scope, string issuer) | |
{ | |
Scope = scope ?? throw new ArgumentNullException(nameof(scope)); | |
Issuer = issuer ?? throw new ArgumentNullException(nameof(issuer)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment