I need an attribute that handles Authorization for my controllers. This is for a facebook application and there are a few hurdles surrounding the problem.
What I really need is the equivalent to a server.transfer but of course that is not an option in ASP MVC. A redirect will not work because of the way facebook consumes the application.
Is there an a way I can re-route from within an ActionFilterAttribute?
public class FbAuthorize : ActionFilterAttribute
{
public override void OnActionExecuting(ActionExecutingContext filterContext)
{
if (!Service.SignedIn())
RouteToAction("Account", "Index"); // Fictional method (I wish it existed)
}
}