Created
July 6, 2020 02:28
-
-
Save xximjasonxx/a5a3f6c6a6190f5d263fea12ed2a7961 to your computer and use it in GitHub Desktop.
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
services.AddAuthorization(options => | |
{ | |
options.AddPolicy("IsWeatherman", policy => policy.Requirements.Add(new IsWeathermanAuthorizationRequirement())); | |
}); | |
services.AddSingleton<IAuthorizationHandler, IsWeathermanAuthorizationHandler>(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment