How can I do something like this:
[OfficeAuthorize(HttpContext.Request.etc)]
I'm guessing it's some sort of DependencyInjection, but I'm not sure where I would do that.
How can I do something like this:
[OfficeAuthorize(HttpContext.Request.etc)]
I'm guessing it's some sort of DependencyInjection, but I'm not sure where I would do that.
the context was available via the AuthorizationFilterContext in the OnAuthorizing function
public void OnAuthorization(AuthorizationFilterContext context)
{
var body = context.HttpContext.Request.Body;
//custom validation rule
}
AuthorizationFilterContext also has a property ActionDescriptor, which in turn has a RouteValues property. This should contain officeId.