コード例 #1
0
ファイル: views.py プロジェクト: kaiquewdev/kuma
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
ファイル: tests.py プロジェクト: pmclanahan/kuma
 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
ファイル: tests.py プロジェクト: pmclanahan/kuma
 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)