def _redirect_with_mindtouch_login(next_url, username, password=None): resp = HttpResponseRedirect(next_url) authtoken = DekiUserBackend.mindtouch_login(username, password, force=True) if authtoken: resp.set_cookie('authtoken', authtoken) return resp
def _redirect_with_mindtouch_login(next_url, username, password=None): resp = HttpResponseRedirect(next_url) if not settings.DEKIWIKI_ENDPOINT: return resp authtoken = DekiUserBackend.mindtouch_login(username, password, force=True) if authtoken: resp.set_cookie('authtoken', authtoken) return resp
def _redirect_with_mindtouch_login(next_url, username, password=None): resp = HttpResponseRedirect(next_url) if not settings.DEKIWIKI_ENDPOINT: return resp authtoken = DekiUserBackend.mindtouch_login(username, password, force=True) if authtoken: resp.set_cookie("authtoken", authtoken) return resp
def test_unicode_mindtouch_login(self): u_str = u'\xe5\xe5\xee\xe9\xf8\xe7\u6709\u52b9' authtoken = DekiUserBackend.mindtouch_login('user', u_str) eq_('authtoken_value', authtoken)
def test_good_mindtouch_login(self): authtoken = DekiUserBackend.mindtouch_login('user', 'pass') eq_('authtoken_value', authtoken)
def test_unicode_mindtouch_login(self): u_str = u'\xe5\xe5\xee\xe9\xf8\xe7\u6709\u52b9' authtoken = DekiUserBackend.mindtouch_login('user', u_str) eq_('authtoken_value', authtoken)
def test_good_mindtouch_login(self): authtoken = DekiUserBackend.mindtouch_login('user', 'pass') eq_('authtoken_value', authtoken)