django-windowsauth
django-windowsauth copied to clipboard
Disable Authentication for specific view
Is your feature request related to a problem? Please describe. Sort of, at the moment, I'm using windowsauth for my admin site, but I find that any view I make is now quite slow to load the first time because it attempts to authenticate the user first. I feel there should be some way to entirely skip any attempt at authentication for a specific view.
Describe the solution you'd like
Same as for @domain_required decorator, I feel there should be a @skip_authentication
decorator so that a view can just be served without attempting any login.
Describe alternatives you've considered N/A
Additional context
Current view is just a simple TemplateView
class:
class AppView(TemplateView):
template_name = "app.html"
And I'd prefer to just be able to say something like:
@method_decorator(authentication_exempt, name="dispatch")
class ChatterBotAppView(TemplateView):
template_name = "app.html"