Пример #1
0
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
Пример #2
0
Файл: views.py Проект: gerv/kuma
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
Пример #3
0
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
Пример #4
0
 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)
Пример #5
0
 def test_good_mindtouch_login(self):
     authtoken = DekiUserBackend.mindtouch_login('user', 'pass')
     eq_('authtoken_value', authtoken)
Пример #6
0
 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)
Пример #7
0
 def test_good_mindtouch_login(self):
     authtoken = DekiUserBackend.mindtouch_login('user', 'pass')
     eq_('authtoken_value', authtoken)