Example #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
Example #2
0
File: views.py Project: 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
Example #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
Example #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)
Example #5
0
 def test_good_mindtouch_login(self):
     authtoken = DekiUserBackend.mindtouch_login('user', 'pass')
     eq_('authtoken_value', authtoken)
Example #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)
Example #7
0
 def test_good_mindtouch_login(self):
     authtoken = DekiUserBackend.mindtouch_login('user', 'pass')
     eq_('authtoken_value', authtoken)