Пример #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
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
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")