When creating a custom attribute in asp.net 5.0. Example was found using https://jasonwatmore.com/post/2019/10/11/aspnet-core-3-jwt-authentication-tutorial-with-example-api