コード例 #1
0
def main(args):

    bs = get_binstar()
    auth = bs.authentication()
    bs.remove_authentication(auth['id'])
    remove_token()
    log.info("logout successful")
コード例 #2
0
def main(args):

    bs = get_binstar()
    auth = bs.authentication()
    bs.remove_authentication(auth['id'])
    remove_token()
    log.info("logout successful")
コード例 #3
0
ファイル: logout.py プロジェクト: jakirkham/anaconda-client
def main(args):

    bs = get_binstar(args)
    if bs.token:
        # TODO: named 'application' because I was using the github model
        # Change it to name once we release the latest version of binstar server
        bs.remove_authentication()
        remove_token(args)
        log.info("logout successful")
    else:
        log.info("You are not logged in")
コード例 #4
0
ファイル: logout.py プロジェクト: coleb/binstar
def main(args):

    bs = get_binstar(args)
    if bs.token:
        # TODO: named 'application' because I was using the github model
        # Change it to name once we release the latest version of binstar server
        bs.remove_authentication()
        remove_token(args)
        log.info("logout successful")
    else:
        log.info("You are not logged in")
コード例 #5
0
def main(args):

    bs = get_binstar(args)
    if bs.token:
    # TODO: named 'application' because I was using the github model
    # Change it to name once we release the latest version of binstar server
        try:
            bs.remove_authentication()
        except errors.Unauthorized as err:
            log.debug("The token that you are trying to remove may not be valid"
                      "{}".format(err))
        remove_token(args)
        log.info("logout successful")
    else:
        log.info("You are not logged in")