python类cookies()的实例源码

webopenid.py 文件源码 项目:bokken 作者: thestr4ng3r 项目源码 文件源码 阅读 17 收藏 0 点赞 0 评论 0
def status():
    oid_hash = web.cookies().get('openid_identity_hash', '').split(',', 1)
    if len(oid_hash) > 1:
        oid_hash, identity_url = oid_hash
        if oid_hash == _hmac(identity_url):
            return identity_url
    return None
webopenid.py 文件源码 项目:bokken 作者: thestr4ng3r 项目源码 文件源码 阅读 22 收藏 0 点赞 0 评论 0
def GET(self):
        n = web.cookies('openid_session_id').openid_session_id
        web.setcookie('openid_session_id', '', expires=-1)
        return_to = sessions[n]['webpy_return_to']

        c = openid.consumer.consumer.Consumer(sessions[n], store)
        a = c.complete(web.input(), web.ctx.home + web.ctx.fullpath)

        if a.status.lower() == 'success':
            web.setcookie('openid_identity_hash', _hmac(a.identity_url) + ',' + a.identity_url)

        del sessions[n]
        return web.redirect(return_to)
webopenid.py 文件源码 项目:CloudPrint 作者: William-An 项目源码 文件源码 阅读 26 收藏 0 点赞 0 评论 0
def status():
    oid_hash = web.cookies().get('openid_identity_hash', '').split(',', 1)
    if len(oid_hash) > 1:
        oid_hash, identity_url = oid_hash
        if oid_hash == _hmac(identity_url):
            return identity_url
    return None
webopenid.py 文件源码 项目:CloudPrint 作者: William-An 项目源码 文件源码 阅读 22 收藏 0 点赞 0 评论 0
def GET(self):
        n = web.cookies('openid_session_id').openid_session_id
        web.setcookie('openid_session_id', '', expires=-1)
        return_to = sessions[n]['webpy_return_to']

        c = openid.consumer.consumer.Consumer(sessions[n], store)
        a = c.complete(web.input(), web.ctx.home + web.ctx.fullpath)

        if a.status.lower() == 'success':
            web.setcookie('openid_identity_hash', _hmac(a.identity_url) + ',' + a.identity_url)

        del sessions[n]
        return web.redirect(return_to)
webopenid.py 文件源码 项目:py-script 作者: xiaoxiamin 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
def status():
    oid_hash = web.cookies().get('openid_identity_hash', '').split(',', 1)
    if len(oid_hash) > 1:
        oid_hash, identity_url = oid_hash
        if oid_hash == _hmac(identity_url):
            return identity_url
    return None
webopenid.py 文件源码 项目:py-script 作者: xiaoxiamin 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def GET(self):
        n = web.cookies('openid_session_id').openid_session_id
        web.setcookie('openid_session_id', '', expires=-1)
        return_to = sessions[n]['webpy_return_to']

        c = openid.consumer.consumer.Consumer(sessions[n], store)
        a = c.complete(web.input(), web.ctx.home + web.ctx.fullpath)

        if a.status.lower() == 'success':
            web.setcookie('openid_identity_hash', _hmac(a.identity_url) + ',' + a.identity_url)

        del sessions[n]
        return web.redirect(return_to)
webopenid.py 文件源码 项目:py-script 作者: xiaoxiamin 项目源码 文件源码 阅读 26 收藏 0 点赞 0 评论 0
def status():
    oid_hash = web.cookies().get('openid_identity_hash', '').split(',', 1)
    if len(oid_hash) > 1:
        oid_hash, identity_url = oid_hash
        if oid_hash == _hmac(identity_url):
            return identity_url
    return None
webopenid.py 文件源码 项目:py-script 作者: xiaoxiamin 项目源码 文件源码 阅读 22 收藏 0 点赞 0 评论 0
def GET(self):
        n = web.cookies('openid_session_id').openid_session_id
        web.setcookie('openid_session_id', '', expires=-1)
        return_to = sessions[n]['webpy_return_to']

        c = openid.consumer.consumer.Consumer(sessions[n], store)
        a = c.complete(web.input(), web.ctx.home + web.ctx.fullpath)

        if a.status.lower() == 'success':
            web.setcookie('openid_identity_hash', _hmac(a.identity_url) + ',' + a.identity_url)

        del sessions[n]
        return web.redirect(return_to)
webopenid.py 文件源码 项目:cosa-nostra 作者: joxeankoret 项目源码 文件源码 阅读 18 收藏 0 点赞 0 评论 0
def status():
    oid_hash = web.cookies().get('openid_identity_hash', '').split(',', 1)
    if len(oid_hash) > 1:
        oid_hash, identity_url = oid_hash
        if oid_hash == _hmac(identity_url):
            return identity_url
    return None
webopenid.py 文件源码 项目:cosa-nostra 作者: joxeankoret 项目源码 文件源码 阅读 19 收藏 0 点赞 0 评论 0
def GET(self):
        n = web.cookies('openid_session_id').openid_session_id
        web.setcookie('openid_session_id', '', expires=-1)
        return_to = sessions[n]['webpy_return_to']

        c = openid.consumer.consumer.Consumer(sessions[n], store)
        a = c.complete(web.input(), web.ctx.home + web.ctx.fullpath)

        if a.status.lower() == 'success':
            web.setcookie('openid_identity_hash', _hmac(a.identity_url) + ',' + a.identity_url)

        del sessions[n]
        return web.redirect(return_to)
webopenid.py 文件源码 项目:birdnet 作者: cyysu 项目源码 文件源码 阅读 22 收藏 0 点赞 0 评论 0
def status():
    oid_hash = web.cookies().get('openid_identity_hash', '').split(',', 1)
    if len(oid_hash) > 1:
        oid_hash, identity_url = oid_hash
        if oid_hash == _hmac(identity_url):
            return identity_url
    return None
webopenid.py 文件源码 项目:birdnet 作者: cyysu 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
def GET(self):
        n = web.cookies('openid_session_id').openid_session_id
        web.setcookie('openid_session_id', '', expires=-1)
        return_to = sessions[n]['webpy_return_to']

        c = openid.consumer.consumer.Consumer(sessions[n], store)
        a = c.complete(web.input(), web.ctx.home + web.ctx.fullpath)

        if a.status.lower() == 'success':
            web.setcookie('openid_identity_hash', _hmac(a.identity_url) + ',' + a.identity_url)

        del sessions[n]
        return web.redirect(return_to)


问题


面经


文章

微信
公众号

扫码关注公众号