Skip to content

Disable Authentication for specific view #21

Open
@MarthinusBosman

Description

@MarthinusBosman

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"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions