The only override I see exposed on MVC's AuthorizeAttribute
is public override void OnAuthorization( AuthorizationContext filterContext )
which is not suitable for use with async/await because it doesn't return a Task
. Is there another way to create an AuthorizeAttribute
in MVC that allows the use of async/await?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…