def authenticate(self, view_function):
        self.view_functions[helper.AUTHENTICATE] = view_function
        def _authenticate(request):
            impersonate = request.REQUEST.get(settings.TWITTER_IMPERSONATE_SESSION_KEY)
            if impersonate:
                request.session[settings.TWITTER_IMPERSONATE_SESSION_KEY] = impersonate
            redirect_to = request.REQUEST.get(self.redirect_field_name, '')
            # Light security check -- make sure redirect_to isn't garbage.
            if not redirect_to or redirect_to in '//' or ' ' in redirect_to:
                redirect_to = settings.LOGIN_REDIRECT_URL
            if request.user.is_authenticated():
                return HttpResponseRedirect(redirect_to)
            request.session['redirect_to'] = redirect_to
            return self._redirect(request, helper.AUTHENTICATE)
        return _authenticate
dataset/ETHPy150Open dgouldin/django-socialite/socialite/apps/base/oauth/decorators.py/OAuthMediator.authenticate/swapped operands of `in`