Ejemplo n.º 1
0
def main(args):

    bs = get_binstar()
    auth = bs.authentication()
    bs.remove_authentication(auth['id'])
    remove_token()
    log.info("logout successful")
Ejemplo n.º 2
0
def main(args):

    bs = get_binstar()
    auth = bs.authentication()
    bs.remove_authentication(auth['id'])
    remove_token()
    log.info("logout successful")
Ejemplo n.º 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")
Ejemplo n.º 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")
Ejemplo n.º 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")