Unfortunately, authentication stuff happens inside the view, we've already gone through all middlewares at this point, so no. 

There are alternatives, like moving most of the auth code to a middleware (meaning we wouldn't need special authentication classes), but that would add other issues to deal with. This is the simplest approach.