سؤال

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