Answers for "allowanonymous not working with custom authorization"

0

allowanonymous not working with custom authorization

private static bool SkipAuthorization(HttpActionContext actionContext)
{
    Contract.Assert(actionContext != null);

    return actionContext.ActionDescriptor.GetCustomAttributes<AllowAnonymousAttribute>().Any()
               || actionContext.ControllerContext.ControllerDescriptor.GetCustomAttributes<AllowAnonymousAttribute>().Any();
}
Posted by: Guest on June-18-2021

Code answers related to "allowanonymous not working with custom authorization"

Browse Popular Code Answers by Language