Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable Authentication for specific view #21

Open
MarthinusBosman opened this issue Sep 6, 2022 · 0 comments
Open

Disable Authentication for specific view #21

MarthinusBosman opened this issue Sep 6, 2022 · 0 comments

Comments

@MarthinusBosman
Copy link

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"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant