Example #1
0
def check_auth(token):
    return con.get(":".join((AUTH_PREFIX, token)))
Example #2
0
def get_auth(username, password):
    """ Tries to get the authentication token."""
    authtoken = auth_hash(username, password)
    if con.get(":".join((AUTH_PREFIX, authtoken))) == username:
        return authtoken