I would like to create my custom authorization filter. I see that in System.Web.Http.AuthorizeAttribute there are two similar methods IsAuthorized and OnAuthorization. Which one should I override and why?

有帮助吗?

解决方案

You should override IsAuthorized, which "Determines whether access for this particular request is authorized."

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top